Skip to content

Commit 76cf5c8

Browse files
authored
Drop support for Python 3.6 (#2338)
1 parent b569f41 commit 76cf5c8

File tree

14 files changed

+40
-141
lines changed

14 files changed

+40
-141
lines changed

.ci/.matrix_exclude.yml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@ exclude:
55
# Django 4.0 requires Python 3.8+
66
- VERSION: pypy-3 # current pypy-3 is compatible with Python 3.7
77
FRAMEWORK: django-4.0
8-
- VERSION: python-3.6
9-
FRAMEWORK: django-4.0
108
- VERSION: python-3.7
119
FRAMEWORK: django-4.0
1210
# Django 4.2 requires Python 3.8+
13-
- VERSION: python-3.6
14-
FRAMEWORK: django-4.2
1511
- VERSION: python-3.7
1612
FRAMEWORK: django-4.2
1713
# Django 5.0 requires Python 3.10+
18-
- VERSION: python-3.6
19-
FRAMEWORK: django-5.0
2014
- VERSION: python-3.7
2115
FRAMEWORK: django-5.0
2216
- VERSION: python-3.8
@@ -25,12 +19,8 @@ exclude:
2519
FRAMEWORK: django-5.0
2620
- VERSION: pypy-3 # current pypy-3 is compatible with Python 3.7
2721
FRAMEWORK: celery-5-django-4
28-
- VERSION: python-3.6
29-
FRAMEWORK: celery-5-django-4
3022
- VERSION: python-3.7
3123
FRAMEWORK: celery-5-django-4
32-
- VERSION: python-3.6
33-
FRAMEWORK: celery-5-django-5
3424
- VERSION: python-3.7
3525
FRAMEWORK: celery-5-django-5
3626
- VERSION: python-3.8
@@ -40,14 +30,6 @@ exclude:
4030
# Flask
4131
- VERSION: pypy-3
4232
FRAMEWORK: flask-0.11 # see https://github.com/pallets/flask/commit/6e46d0cd, 0.11.2 was never released
43-
- VERSION: python-3.6
44-
FRAMEWORK: flask-2.1
45-
- VERSION: python-3.6
46-
FRAMEWORK: flask-2.2
47-
- VERSION: python-3.6
48-
FRAMEWORK: flask-2.3
49-
- VERSION: python-3.6
50-
FRAMEWORK: flask-3.0
5133
- VERSION: python-3.7
5234
FRAMEWORK: flask-2.3
5335
- VERSION: python-3.7
@@ -185,8 +167,6 @@ exclude:
185167
# pymssql
186168
- VERSION: pypy-3 # currently fails with error on pypy3
187169
FRAMEWORK: pymssql-newest
188-
- VERSION: python-3.6 # dropped support for py3.6
189-
FRAMEWORK: pymssql-newest
190170
# pyodbc
191171
- VERSION: pypy-3
192172
FRAMEWORK: pyodbc-newest
@@ -210,81 +190,49 @@ exclude:
210190
# aiohttp client, only supported in Python 3.7+
211191
- VERSION: pypy-3
212192
FRAMEWORK: aiohttp-3.0
213-
- VERSION: python-3.6
214-
FRAMEWORK: aiohttp-3.0
215193
- VERSION: pypy-3
216194
FRAMEWORK: aiohttp-4.0
217-
- VERSION: python-3.6
218-
FRAMEWORK: aiohttp-4.0
219195
- VERSION: pypy-3
220196
FRAMEWORK: aiohttp-newest
221-
- VERSION: python-3.6
222-
FRAMEWORK: aiohttp-newest
223197
# tornado, only supported in Python 3.7+
224198
- VERSION: pypy-3
225199
FRAMEWORK: tornado-newest
226-
- VERSION: python-3.6
227-
FRAMEWORK: tornado-newest
228200
# Starlette, only supported in python 3.7+
229201
- VERSION: pypy-3
230202
FRAMEWORK: starlette-0.13
231-
- VERSION: python-3.6
232-
FRAMEWORK: starlette-0.13
233203
- VERSION: pypy-3
234204
FRAMEWORK: starlette-0.14
235-
- VERSION: python-3.6
236-
FRAMEWORK: starlette-0.14
237205
- VERSION: pypy-3
238206
FRAMEWORK: starlette-newest
239-
- VERSION: python-3.6
240-
FRAMEWORK: starlette-newest
241207
# aiopg
242208
- VERSION: pypy-3
243209
FRAMEWORK: aiopg-newest
244-
- VERSION: python-3.6
245-
FRAMEWORK: aiopg-newest
246210
# asyncpg
247211
- VERSION: pypy-3
248212
FRAMEWORK: asyncpg-newest
249213
- VERSION: pypy-3
250214
FRAMEWORK: asyncpg-0.28
251-
- VERSION: python-3.6
252-
FRAMEWORK: asyncpg-newest
253-
- VERSION: python-3.6
254-
FRAMEWORK: asyncpg-0.28
255215
- VERSION: python-3.13
256216
FRAMEWORK: asyncpg-0.28
257217
# sanic
258218
- VERSION: pypy-3
259219
FRAMEWORK: sanic-newest
260220
- VERSION: pypy-3
261221
FRAMEWORK: sanic-20.12
262-
- VERSION: python-3.6
263-
FRAMEWORK: sanic-20.12
264-
- VERSION: python-3.6
265-
FRAMEWORK: sanic-newest
266222
- VERSION: python-3.8
267223
FRAMEWORK: sanic-newest
268224
- VERSION: python-3.13
269225
FRAMEWORK: sanic-20.12
270226
# aioredis
271227
- VERSION: pypy-3
272228
FRAMEWORK: aioredis-newest
273-
- VERSION: python-3.6
274-
FRAMEWORK: aioredis-newest
275229
# aiomysql
276230
- VERSION: pypy-3
277231
FRAMEWORK: aiomysql-newest
278-
- VERSION: python-3.6
279-
FRAMEWORK: aiomysql-newest
280232
# aiobotocore
281233
- VERSION: pypy-3
282234
FRAMEWORK: aiobotocore-newest
283-
- VERSION: python-3.6
284-
FRAMEWORK: aiobotocore-newest
285235
# mysql-connector-python
286-
- VERSION: python-3.6
287-
FRAMEWORK: mysql_connector-newest
288236
# twisted
289237
- VERSION: python-3.11
290238
FRAMEWORK: twisted-18
@@ -318,8 +266,6 @@ exclude:
318266
- VERSION: python-3.13
319267
FRAMEWORK: pylibmc-1.4
320268
# grpc
321-
- VERSION: python-3.6
322-
FRAMEWORK: grpc-newest
323269
- VERSION: python-3.7
324270
FRAMEWORK: grpc-1.24
325271
- VERSION: python-3.8

.ci/.matrix_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
VERSION:
2-
- python-3.6
2+
- python-3.7
33
- python-3.13

.ci/.matrix_python_full.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
VERSION:
2-
- python-3.6
32
- python-3.7
43
- python-3.8
54
- python-3.9

.ci/.matrix_windows.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.ci/publish-aws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for region in $ALL_AWS_REGIONS; do
4646
--layer-name="${FULL_LAYER_NAME}" \
4747
--description="AWS Lambda Extension Layer for the Elastic APM Python Agent" \
4848
--license-info="BSD-3-Clause" \
49-
--compatible-runtimes python3.6 python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13\
49+
--compatible-runtimes python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13\
5050
--zip-file="fileb://${zip_file}")
5151
echo "${publish_output}" > "${AWS_FOLDER}/${region}"
5252
layer_version=$(echo "${publish_output}" | jq '.Version')

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ jobs:
114114
fail-fast: false
115115
matrix:
116116
include:
117-
# - version: "3.6"
118-
# framework: "none"
119-
# asyncio: "true"
120117
# - version: "3.7"
121118
# framework: none
122119
# asyncio: true

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,8 @@ flake8:
1010
test:
1111
# delete any __pycache__ folders to avoid hard-to-debug caching issues
1212
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
13-
# pypy3 should be added to the first `if` once it supports py3.7
14-
if [[ "$$PYTHON_VERSION" =~ ^(3.7|3.8|3.9|3.10|3.11|3.12|3.13|nightly)$$ ]] ; then \
15-
echo "Python 3.7+, with asyncio"; \
16-
pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT); \
17-
else \
18-
echo "Python < 3.7, without asyncio"; \
19-
pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT) --ignore-glob='*/asyncio*/*'; \
20-
fi
13+
echo "Python 3.7+, with asyncio"; \
14+
pytest -v $(PYTEST_ARGS) --showlocals $(PYTEST_MARKER) $(PYTEST_JUNIT); \
2115

2216
coverage: PYTEST_ARGS=--cov --cov-context=test --cov-config=setup.cfg --cov-branch
2317
coverage: export COVERAGE_FILE=.coverage.docker.$(PYTHON_FULL_VERSION).$(FRAMEWORK)

docs/reference/run-tests-locally.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $ ./tests/scripts/docker/run_tests.sh python-version framework-version <pip-cach
5353
```
5454

5555
::::{note}
56-
The `python-version` must be of format `python-version`, e.g. `python-3.6` or `pypy-2`. The `framework` must be of format `framework-version`, e.g. `django-1.10` or `flask-0.12`.
56+
The `python-version` must be of format `python-version`, e.g. `python-3.8` or `pypy-3`. The `framework` must be of format `framework-version`, e.g. `django-1.10` or `flask-0.12`.
5757
::::
5858

5959

elasticapm/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
VERSION = "unknown"
6363

6464

65-
if sys.version_info <= (3, 5):
66-
raise DeprecationWarning("The Elastic APM agent requires Python 3.6+")
65+
if sys.version_info < (3, 7):
66+
raise DeprecationWarning("The Elastic APM agent requires Python 3.7+")
6767

6868
from elasticapm.contrib.asyncio.traces import async_capture_span # noqa: F401 E402

elasticapm/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ def should_ignore_topic(self, topic: str) -> bool:
704704

705705
def check_python_version(self) -> None:
706706
v = tuple(map(int, platform.python_version_tuple()[:2]))
707-
if v < (3, 6):
708-
warnings.warn("The Elastic APM agent only supports Python 3.6+", DeprecationWarning)
707+
if v < (3, 7):
708+
warnings.warn("The Elastic APM agent only supports Python 3.7+", DeprecationWarning)
709709

710710
def check_server_version(
711711
self, gte: Optional[Tuple[int, ...]] = None, lte: Optional[Tuple[int, ...]] = None

0 commit comments

Comments
 (0)