Skip to content

Commit 5014ce5

Browse files
authored
Drop support for Python 3.6 (#2268)
1 parent 8c4557c commit 5014ce5

File tree

6 files changed

+14
-32
lines changed

6 files changed

+14
-32
lines changed

docs/guide/configuration.asciidoc

+1-8
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,12 @@ es = Elasticsearch(
5353
[discrete]
5454
==== TLS versions
5555

56-
Configuring the minimum TLS version to connect to is done via the `ssl_version` parameter. By default this is set to a minimum value of TLSv1.2. In Python 3.7+ you can use the new `ssl.TLSVersion` enumeration to specify versions.
56+
Configuring the minimum TLS version to connect to is done via the `ssl_version` parameter. By default this is set to a minimum value of TLSv1.2. Use the `ssl.TLSVersion` enumeration to specify versions.
5757

5858
[source,python]
5959
------------------------------------
6060
import ssl
6161
62-
# Python 3.6
63-
es = Elasticsearch(
64-
...,
65-
ssl_version=ssl.PROTOCOL_TSLv1_2
66-
)
67-
68-
# Python 3.7+
6962
es = Elasticsearch(
7063
...,
7164
ssl_version=ssl.TLSVersion.TLSv1_2

docs/guide/getting-started.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ operations with it.
88
[discrete]
99
=== Requirements
1010

11-
* https://www.python.org/[Python] 3.6 or newer
11+
* https://www.python.org/[Python] 3.7 or newer
1212
* https://pip.pypa.io/en/stable/[`pip`], installed by default alongside Python
1313

1414
[discrete]

docs/sphinx/async.rst

+9-14
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,17 @@ Using Asyncio with Elasticsearch
44
.. py:module:: elasticsearch
55
:no-index:
66

7-
Starting in ``elasticsearch-py`` v7.8.0 for Python 3.6+ the ``elasticsearch`` package supports async/await with
7+
The ``elasticsearch`` package supports async/await with
88
`Asyncio <https://docs.python.org/3/library/asyncio.html>`_ and `Aiohttp <https://docs.aiohttp.org>`_.
99
You can either install ``aiohttp`` directly or use the ``[async]`` extra:
1010

1111
.. code-block:: bash
1212
13-
$ python -m pip install elasticsearch>=7.8.0 aiohttp
13+
$ python -m pip install elasticsearch aiohttp
1414
1515
# - OR -
1616
17-
$ python -m pip install elasticsearch[async]>=7.8.0
18-
19-
.. note::
20-
Async functionality is a new feature of this library in v7.8.0+ so
21-
`please open an issue <https://github.com/elastic/elasticsearch-py/issues>`_
22-
if you find an issue or have a question about async support.
17+
$ python -m pip install elasticsearch[async]
2318
2419
Getting Started with Async
2520
--------------------------
@@ -67,13 +62,13 @@ in the ``examples/fastapi-apm`` directory.
6762
Frequently Asked Questions
6863
--------------------------
6964

70-
NameError / ImportError when importing ``AsyncElasticsearch``?
71-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
ValueError when initializing ``AsyncElasticsearch``?
66+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7267

73-
If when trying to use ``AsyncElasticsearch`` and you're receiving a ``NameError`` or ``ImportError``
74-
you should ensure that you're running Python 3.6+ (check with ``$ python --version``) and
75-
that you have ``aiohttp`` installed in your environment (check with ``$ python -m pip freeze | grep aiohttp``).
76-
If either of the above conditions is not met then async support won't be available.
68+
If when trying to use ``AsyncElasticsearch`` you receive ``ValueError: You must
69+
have 'aiohttp' installed to use AiohttpHttpNode`` you should ensure that you
70+
have ``aiohttp`` installed in your environment (check with ``$ python -m pip
71+
freeze | grep aiohttp``). Otherwise, async support won't be available.
7772

7873
What about the ``elasticsearch-async`` package?
7974
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/sphinx/quickstart.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ operations like indexing or searching documents.
99
Requirements
1010
------------
1111

12-
- `Python <https://www.python.org/>`_ 3.6 or newer
12+
- `Python <https://www.python.org/>`_ 3.7 or newer
1313
- `pip <https://pip.pypa.io/en/stable/>`_
1414

1515

noxfile.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@
3232
INSTALL_ENV = {"AIOHTTP_NO_EXTENSIONS": "1"}
3333

3434

35-
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
35+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"])
3636
def test(session):
3737
session.install(".[async,requests]", env=INSTALL_ENV, silent=False)
3838
session.install("-r", "dev-requirements.txt", silent=False)
3939

40-
python_version = tuple(int(x) for x in session.python.split("."))
4140
junit_xml = os.path.join(SOURCE_DIR, "junit", "elasticsearch-py-junit.xml")
4241
pytest_argv = [
4342
"pytest",
@@ -49,10 +48,6 @@ def test(session):
4948
"--cache-clear",
5049
"-vv",
5150
]
52-
# Python 3.6+ is required for async
53-
if python_version < (3, 6):
54-
pytest_argv.append("--ignore=test_elasticsearch/test_async/")
55-
5651
session.run(*pytest_argv)
5752

5853

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"Operating System :: OS Independent",
8181
"Programming Language :: Python",
8282
"Programming Language :: Python :: 3",
83-
"Programming Language :: Python :: 3.6",
8483
"Programming Language :: Python :: 3.7",
8584
"Programming Language :: Python :: 3.8",
8685
"Programming Language :: Python :: 3.9",
@@ -90,7 +89,7 @@
9089
"Programming Language :: Python :: Implementation :: CPython",
9190
"Programming Language :: Python :: Implementation :: PyPy",
9291
],
93-
python_requires=">=3.6",
92+
python_requires=">=3.7",
9493
install_requires=install_requires,
9594
extras_require={
9695
"requests": ["requests>=2.4.0, <3.0.0"],

0 commit comments

Comments
 (0)