mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-29 13:12:39 +08:00
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>
This commit is contained in:
@ -156,13 +156,6 @@ def patch():
|
||||
for signal in signals:
|
||||
module = 'flask'
|
||||
|
||||
# v0.9 missed importing `appcontext_tearing_down` in `flask/__init__.py`
|
||||
# https://github.com/pallets/flask/blob/0.9/flask/__init__.py#L35-L37
|
||||
# https://github.com/pallets/flask/blob/0.9/flask/signals.py#L52
|
||||
# DEV: Version 0.9 doesn't have a patch version
|
||||
if flask_version <= (0, 9) and signal == 'appcontext_tearing_down':
|
||||
module = 'flask.signals'
|
||||
|
||||
# DEV: Patch `receivers_for` instead of `connect` to ensure we don't mess with `disconnect`
|
||||
_w(module, '{}.receivers_for'.format(signal), traced_signal_receivers_for(signal))
|
||||
|
||||
@ -241,13 +234,6 @@ def unpatch():
|
||||
# Handle 'flask.request_started.receivers_for'
|
||||
obj = flask
|
||||
|
||||
# v0.9.0 missed importing `appcontext_tearing_down` in `flask/__init__.py`
|
||||
# https://github.com/pallets/flask/blob/0.9/flask/__init__.py#L35-L37
|
||||
# https://github.com/pallets/flask/blob/0.9/flask/signals.py#L52
|
||||
# DEV: Version 0.9 doesn't have a patch version
|
||||
if flask_version <= (0, 9) and prop == 'appcontext_tearing_down.receivers_for':
|
||||
obj = flask.signals
|
||||
|
||||
if '.' in prop:
|
||||
attr, _, prop = prop.partition('.')
|
||||
obj = getattr(obj, attr, object())
|
||||
|
Reference in New Issue
Block a user