|
1 | | -import sys |
2 | 1 | import os |
| 2 | +import sys |
3 | 3 |
|
4 | 4 |
|
5 | 5 | LOADED_MODULES = frozenset(sys.modules.keys()) |
|
12 | 12 | # configure ddtrace logger before other modules log |
13 | 13 | configure_ddtrace_logger() # noqa: E402 |
14 | 14 |
|
15 | | -from .settings._config import config |
16 | | - |
17 | | - |
18 | 15 | # Enable telemetry writer and excepthook as early as possible to ensure we capture any exceptions from initialization |
19 | 16 | import ddtrace.internal.telemetry # noqa: E402 |
| 17 | +from ddtrace.vendor import debtcollector |
20 | 18 |
|
21 | 19 | from ._monkey import patch # noqa: E402 |
22 | 20 | from ._monkey import patch_all # noqa: E402 |
23 | 21 | from .internal.compat import PYTHON_VERSION_INFO # noqa: E402 |
24 | 22 | from .internal.utils.deprecations import DDTraceDeprecationWarning # noqa: E402 |
25 | | - |
26 | | -from ddtrace.vendor import debtcollector |
| 23 | +from .settings._config import config |
27 | 24 | from .version import get_version # noqa: E402 |
28 | 25 |
|
| 26 | + |
29 | 27 | __version__ = get_version() |
30 | 28 |
|
31 | 29 | # TODO: Deprecate accessing tracer from ddtrace.__init__ module in v4.0 |
|
41 | 39 |
|
42 | 40 |
|
43 | 41 | def check_supported_python_version(): |
44 | | - if PYTHON_VERSION_INFO < (3, 8): |
| 42 | + if PYTHON_VERSION_INFO < (3, 9): |
45 | 43 | deprecation_message = ( |
46 | | - "Support for ddtrace with Python version %d.%d is deprecated and will be removed in 3.0.0." |
| 44 | + "Support for ddtrace with Python version %d.%d is deprecated and will be removed in 4.0.0." |
47 | 45 | ) |
48 | | - if PYTHON_VERSION_INFO < (3, 7): |
49 | | - deprecation_message = "Support for ddtrace with Python version %d.%d was removed in 2.0.0." |
| 46 | + if PYTHON_VERSION_INFO < (3, 8): |
| 47 | + deprecation_message = "Support for ddtrace with Python version %d.%d was removed in 3.0.0." |
50 | 48 | debtcollector.deprecate( |
51 | 49 | (deprecation_message % (PYTHON_VERSION_INFO[0], PYTHON_VERSION_INFO[1])), |
52 | 50 | category=DDTraceDeprecationWarning, |
|
0 commit comments