Repository navigation
chore(layer): drop C sources and type stubs from all packages - #902
Merged
Merged
Conversation
The source and .pyi cleanup only ran under ddtrace/. Other packages ship them too: wrapt/_wrappers.c (~150 kB), wrapt-stubs and ujson-stubs (~32 kB). None are imported at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
More details
The deletion patterns preserve runtime Python modules and native shared libraries. Static review identified no actionable defect; layer builds and runtime smoke tests were not independently rerun.
🤖 Bits Code Review · Commit 4c21337
This was referenced Dec 4, 2026
purple4reina
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Runs the C/C++/Cython source and
.pyicleanup over all ofsite-packagesinstead of onlyddtrace/, adds*.pxd, merges the sevenfindlayers into one, and removes the directories it leaves empty.Motivation
Other packages in the layer ship build sources and type stubs that nothing imports at runtime:
wrapt/_wrappers.cwrapt-stubs/__init__.pyiujson-stubs/__init__.pyiResults (Python 3.15, amd64)
ddtrace_serverless4.18.0rc1)Together with #901, the dd-trace-py main build goes from 25,466 kB to 24,565 kB (−901 kB).
Testing Guidelines
./scripts/build_layers.shand rancheck_layer_size.sh(numbers above).public.ecr.aws/sam/build-python3.15:1: wrapt's C extension still loads, integrations patch, anddatadog_lambda.handleremitsaws.lambdaandsqlite.queryspans.Types of Changes
Check all that apply
🤖 Generated with Claude Code