Fix test-matrix, mypy, and bad backport

- test-matrix.yml was intepreting 3.10 as '3.1' via float
- mypy recently removed its built-in type stubs for many
  third-party libraries so now need to install 'types-requests'
- Backport of the ELASTIC_CLIENT_APIVERSIONING test case
  included '8' instead of '7'
This commit is contained in:
Seth Michael Larson
2021-06-23 08:51:33 -05:00
parent 8438a24c6c
commit a82b2920e0
3 changed files with 11 additions and 11 deletions
+9 -9
View File
@@ -1,18 +1,18 @@
STACK_VERSION: STACK_VERSION:
- 7.x-SNAPSHOT - 7.13-SNAPSHOT
TEST_SUITE: TEST_SUITE:
- platinum - platinum
PYTHON_VERSION: PYTHON_VERSION:
- 2.7 - "2.7"
- 3.4 - "3.4"
- 3.5 - "3.5"
- 3.6 - "3.6"
- 3.7 - "3.7"
- 3.8 - "3.8"
- 3.9 - "3.9"
- 3.10 - "3.10"
PYTHON_CONNECTION_CLASS: PYTHON_CONNECTION_CLASS:
- Urllib3HttpConnection - Urllib3HttpConnection
+1 -1
View File
@@ -47,7 +47,7 @@ def format(session):
@nox.session() @nox.session()
def lint(session): def lint(session):
session.install("flake8", "black", "mypy", "isort") session.install("flake8", "black", "mypy", "isort", "types-requests")
session.run("isort", "--check", "--profile=black", *SOURCE_FILES) session.run("isort", "--check", "--profile=black", *SOURCE_FILES)
session.run("black", "--target-version=py27", "--check", *SOURCE_FILES) session.run("black", "--target-version=py27", "--check", *SOURCE_FILES)
+1 -1
View File
@@ -188,7 +188,7 @@ class TestBaseConnection(TestCase):
conn = Connection() conn = Connection()
assert ( assert (
conn.headers["accept"] conn.headers["accept"]
== "application/vnd.elasticsearch+json;compatible-with=8" == "application/vnd.elasticsearch+json;compatible-with=7"
) )
finally: finally:
os.environ.pop("ELASTIC_CLIENT_APIVERSIONING") os.environ.pop("ELASTIC_CLIENT_APIVERSIONING")