@@ -22,8 +22,8 @@ RUN rm -rf ./python/lib/$runtime/site-packages/botocore*
2222RUN rm -rf ./python/lib/$runtime/site-packages/setuptools
2323RUN rm -rf ./python/lib/$runtime/site-packages/jsonschema/tests
2424RUN find . -name 'libddwaf.so' -delete
25- RUN rm -rf ./python/lib/$runtime/site-packages/urllib3*
26- RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracking/*.so
25+ # Comment this line out for now since ddtrace now tries to import it
26+ # RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracking/*.so
2727RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so
2828RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/libdd_wrapper*.so
2929RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/ddup/_ddup.*.so
@@ -32,6 +32,14 @@ RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/st
3232RUN find ./python/lib/$runtime/site-packages/*.dist-info -not -name "entry_points.txt" -type f -delete
3333RUN find ./python/lib/$runtime/site-packages -type d -empty -delete
3434
35+ # Remove requests and dependencies
36+ RUN rm -rf \
37+ ./python/lib/$runtime/site-packages/requests* \
38+ ./python/lib/$runtime/site-packages/urllib3* \
39+ ./python/lib/$runtime/site-packages/certifi* \
40+ ./python/lib/$runtime/site-packages/idna* \
41+ ./python/lib/$runtime/site-packages/charset_normalizer*
42+
3543# Precompile all .pyc files and remove .py files. This speeds up load time.
3644# Compile with optimization level 2 (-OO) and PYTHONNODEBUGRANGES=1 to redtce
3745# size of .pyc files.
0 commit comments