From 9b950e2ce75242dd89fdba5bd3983b8db4c5dceb Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 23 Aug 2023 09:55:40 +0400 Subject: [PATCH] Drop support for Python 3.6 --- .github/workflows/ci.yml | 1 - elasticsearch_dsl/index.py | 1 - elasticsearch_dsl/update_by_query.py | 1 - noxfile.py | 9 ++++----- setup.py | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91fffeeda..0eade8354 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,6 @@ jobs: fail-fast: false matrix: python-version: [ - "3.6", "3.7", "3.8", "3.9", diff --git a/elasticsearch_dsl/index.py b/elasticsearch_dsl/index.py index 8e8dd369b..ffd95dab9 100644 --- a/elasticsearch_dsl/index.py +++ b/elasticsearch_dsl/index.py @@ -50,7 +50,6 @@ def to_dict(self): return d def save(self, using=None): - es = get_connection(using or self._index._using) return es.indices.put_template(name=self._template_name, body=self.to_dict()) diff --git a/elasticsearch_dsl/update_by_query.py b/elasticsearch_dsl/update_by_query.py index 67afdf95f..9b89f62b6 100644 --- a/elasticsearch_dsl/update_by_query.py +++ b/elasticsearch_dsl/update_by_query.py @@ -23,7 +23,6 @@ class UpdateByQuery(Request): - query = ProxyDescriptor("query") def __init__(self, **kwargs): diff --git a/noxfile.py b/noxfile.py index 3d8cb35d2..8017b39bc 100644 --- a/noxfile.py +++ b/noxfile.py @@ -30,7 +30,6 @@ @nox.session( python=[ - "3.6", "3.7", "3.8", "3.9", @@ -55,8 +54,8 @@ def test(session): @nox.session() def format(session): - session.install("black==21.12b0", "click==8.0.4", "isort") - session.run("black", "--target-version=py36", *SOURCE_FILES) + session.install("black~=23.0", "isort") + session.run("black", "--target-version=py37", *SOURCE_FILES) session.run("isort", *SOURCE_FILES) session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES) @@ -65,8 +64,8 @@ def format(session): @nox.session def lint(session): - session.install("flake8", "black==21.12b0", "click==8.0.4", "isort") - session.run("black", "--check", "--target-version=py36", *SOURCE_FILES) + session.install("flake8", "black~=23.0", "isort") + session.run("black", "--check", "--target-version=py37", *SOURCE_FILES) session.run("isort", "--check", *SOURCE_FILES) session.run("flake8", "--ignore=E501,E741,W503", *SOURCE_FILES) session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES) diff --git a/setup.py b/setup.py index 5909ee59c..42960dac1 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ author="Elastic Client Library Maintainers", author_email="client-libs@elastic.co", packages=find_packages(where=".", exclude=("tests*",)), - python_requires=">=3.6", + python_requires=">=3.7", classifiers=[ "Development Status :: 4 - Beta", "License :: OSI Approved :: Apache Software License", @@ -62,7 +62,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9",