You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN PYTHONNODEBUGRANGES=1 python -OO -m compileall -b ./python/lib/$runtime/site-packages
65
65
# remove all .py files
66
-
# DEV: previously we kept patch.py files, but this is no longer necessary
67
-
RUN find ./python/lib/$runtime/site-packages -name \*.py | xargs rm -rf
66
+
# DEV: ddtrace>=4.7.0rc4 checks for .pyc files in addition to .py files for instrumentation
67
+
# discovery (DataDog/dd-trace-py#17196), so we can safely remove all .py files.
68
+
# For older versions, we need to keep patch.py files for instrumentation discovery.
69
+
RUN if python -c "from packaging.version import Version; import ddtrace; exit(0 if Version(ddtrace.__version__) >= Version('4.7.0rc4') else 1)"; then \
0 commit comments