Skip to content

Commit ed6dd7f

Browse files
authored
Removing support for python 2.7 (#2)
OpenTelemetry doesn't support Python 2.7. Removing it from the tests and removing contrib packages that don't support Python 3. In this change: - removing pylons contrib - removing mysqldb contrib - updating minimum versions of flask (>=1.0), gevent (>=1.1) Signed-off-by: Alex Boten <aboten@lightstep.com>
1 parent f13c716 commit ed6dd7f

33 files changed

+63
-1062
lines changed

.circleci/config.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -202,17 +202,6 @@ jobs:
202202
- *persist_to_workspace_step
203203
- *save_cache_step
204204

205-
pylons:
206-
docker:
207-
- *test_runner
208-
resource_class: *resource_class
209-
steps:
210-
- checkout
211-
- *restore_cache_step
212-
- run: scripts/run-tox-scenario '^pylons_contrib-'
213-
- *persist_to_workspace_step
214-
- *save_cache_step
215-
216205
aiohttp:
217206
docker:
218207
- *test_runner
@@ -318,7 +307,7 @@ jobs:
318307
steps:
319308
- checkout
320309
- *restore_cache_step
321-
- run: tox -e 'falcon_contrib{,_autopatch}-{py27,py34,py35,py36}-falcon{10,11,12,13,14}' --result-json /tmp/falcon.results
310+
- run: tox -e 'falcon_contrib{,_autopatch}-{py34,py35,py36}-falcon{10,11,12,13,14}' --result-json /tmp/falcon.results
322311
- *persist_to_workspace_step
323312
- *save_cache_step
324313

@@ -720,7 +709,7 @@ jobs:
720709
- run:
721710
command: |
722711
mkdir -p /tmp/test-reports
723-
tox -e 'benchmarks-{py27,py34,py35,py36,py37}' --result-json /tmp/benchmarks.results -- --benchmark-storage=file:///tmp/test-reports/ --benchmark-autosave
712+
tox -e 'benchmarks-{py34,py35,py36,py37}' --result-json /tmp/benchmarks.results -- --benchmark-storage=file:///tmp/test-reports/ --benchmark-autosave
724713
- store_test_results:
725714
path: /tmp/test-reports
726715
- store_artifacts:
@@ -985,10 +974,6 @@ workflows:
985974
requires:
986975
- flake8
987976
- black
988-
- pylons:
989-
requires:
990-
- flake8
991-
- black
992977
- pymemcache:
993978
requires:
994979
- flake8
@@ -1097,7 +1082,6 @@ workflows:
10971082
- opentracer
10981083
- psycopg
10991084
- pylibmc
1100-
- pylons
11011085
- pymemcache
11021086
- pymongo
11031087
- pymysql

conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import pytest
1313

14-
PY_DIR_PATTERN = re.compile(r"^py[23][0-9]$")
14+
PY_DIR_PATTERN = re.compile(r"^py3[0-9]$")
1515

1616

1717
# Determine if the folder should be ignored
@@ -27,7 +27,6 @@ def pytest_ignore_collect(path, config):
2727
Example::
2828
2929
File: tests/contrib/vertica/py35/test.py
30-
Python 2.7: Skip
3130
Python 3.4: Skip
3231
Python 3.5: Collect
3332
Python 3.6: Collect

ddtrace/bootstrap/sitecustomize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"django": True,
4444
"falcon": True,
4545
"flask": True,
46-
"pylons": True,
4746
"pyramid": True,
4847
}
4948

ddtrace/commands/ddtrace_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
DATADOG_TRACE_AGENT_PORT=8126: override the port that the default tracer will submit to (default: 8126)
3232
DATADOG_SERVICE_NAME : override the service name to be used for this program (no default)
3333
This value is passed through when setting up middleware for web framework integrations.
34-
(e.g. pylons, flask, django)
34+
(e.g. flask, django)
3535
For tracing without a web integration, prefer setting the service name in code.
3636
DATADOG_PRIORITY_SAMPLING=true|false : (default: false): enables Priority Sampling.
3737
""" # noqa: E501

ddtrace/contrib/flask/patch.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,6 @@ def patch():
156156
for signal in signals:
157157
module = 'flask'
158158

159-
# v0.9 missed importing `appcontext_tearing_down` in `flask/__init__.py`
160-
# https://github.com/pallets/flask/blob/0.9/flask/__init__.py#L35-L37
161-
# https://github.com/pallets/flask/blob/0.9/flask/signals.py#L52
162-
# DEV: Version 0.9 doesn't have a patch version
163-
if flask_version <= (0, 9) and signal == 'appcontext_tearing_down':
164-
module = 'flask.signals'
165-
166159
# DEV: Patch `receivers_for` instead of `connect` to ensure we don't mess with `disconnect`
167160
_w(module, '{}.receivers_for'.format(signal), traced_signal_receivers_for(signal))
168161

@@ -241,13 +234,6 @@ def unpatch():
241234
# Handle 'flask.request_started.receivers_for'
242235
obj = flask
243236

244-
# v0.9.0 missed importing `appcontext_tearing_down` in `flask/__init__.py`
245-
# https://github.com/pallets/flask/blob/0.9/flask/__init__.py#L35-L37
246-
# https://github.com/pallets/flask/blob/0.9/flask/signals.py#L52
247-
# DEV: Version 0.9 doesn't have a patch version
248-
if flask_version <= (0, 9) and prop == 'appcontext_tearing_down.receivers_for':
249-
obj = flask.signals
250-
251237
if '.' in prop:
252238
attr, _, prop = prop.partition('.')
253239
obj = getattr(obj, attr, object())

ddtrace/contrib/pylons/__init__.py

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

ddtrace/contrib/pylons/compat.py

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

ddtrace/contrib/pylons/constants.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

ddtrace/contrib/pylons/middleware.py

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

ddtrace/contrib/pylons/patch.py

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

0 commit comments

Comments
 (0)