chore: include the running CPython version in the unsupported error (PROF-14439) - #19911
chore: include the running CPython version in the unsupported error (PROF-14439)#19911vlad-scherbich wants to merge 9 commits into
Conversation
Codeowners resolved asResolved from the full PR diff against |
Circular import analysis
|
Dependency direction analysis
|
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 0082495 | Docs | View more details | Give us feedback! |
BenchmarksBenchmark execution time: 2026-08-30 03:20:20 Comparing candidate commit 0082495 in PR branch Found 0 performance improvements and 8 performance regressions! Performance is the same for 578 metrics, 10 unstable metrics, 18 flaky benchmarks without significant changes.
|
0f7f01c to
38c0fae
Compare
The release_pypi job uploaded every artifact matching pywheels/ddtrace-*, which includes the cp315 wheels that "build linux" produces for internal S3 and the private prerelease index. Nothing prevented a Python 3.15 artifact from reaching PyPI other than the Requires-Python bound baked into the wheel metadata, which is a property of the artifact rather than a release guard. Filter cp315 out of the upload list and refuse to upload at all if the resulting list is empty, so a broken filter fails the job instead of silently uploading everything or nothing. twine check --strict still runs over the whole of pywheels/, so cp315 artifacts remain validated. The S3 and adms prerelease paths are unchanged: those are the intended consumers.
…is uploaded The comment used DEV(py-315), a marker form this repo has never used; main has three TODO(py-315) anchors and only a bare "# DEV:" convention. Build the upload list before "twine check" so both steps see the same distributions. --strict promotes warnings to errors, so checking the unfiltered directory let a malformed cp315 wheel from an allow_failure build fail a release whose supported wheels were all fine. release_pypi_prod depends on "ddtrace package", which carries no serverless artifacts, so the narrowed check loses no coverage beyond cp315.
release_pypi_prod is gated on .is_release, so a PR pipeline never runs its shell and the filter added in the previous commit had no coverage. Pull the script block out of .gitlab/release.yml and run it against fixture directories with aws and uvx stubbed on PATH, so the assertions cannot drift from the shipped YAML. Pins three invariants: cp315 wheels are withheld while 3.15 is unsupported and everything else including the sdist still uploads; twine check and twine upload receive the same list, so a malformed wheel from the allow_failure cp315 build cannot fail a release it is not part of; and an empty list is a hard error rather than a silent no-op.
Test docstrings are never Sphinx-rendered, and AGENTS.md (L43-50) treats rST inline markup in them as editor noise. Replace the double-backtick literals in tests/internal/test_release_pypi_filter.py with plain text.
PR #19880 filtered cp315 out of the PyPI upload only, on the stated premise that the other destination was "internal S3 and the private prerelease index". That is wrong: s3://dd-trace-py-builds is anonymously readable and listable and is registered in DataDog/cloud-inventory as a "Public bucket to host dev builds of dd-trace-py from GitLab to share with customers". The pipeline republished cp315 wheels to main/ on 2026-08-27, so the leak was live, not historical. Three mechanisms publish a ddtrace wheel outside the pipeline: twine to PyPI, aws s3 cp to that bucket, and adms to pypi-private-prereleases. All three now call .gitlab/scripts/prune-unsupported-wheels.sh first, which holds the withheld ABI tags in one place. Putting it inside upload-wheels-to-s3.sh covers every S3 caller and every index suffix, including "upload serverless", which no filter reached before. The PyPI-side shell in release.yml reverts to the pre-filter form plus one prune call, per review feedback: with cp315 gone from the "ddtrace package" artifact, twine check no longer needs a hand-built file list. tests/internal/test_unsupported_wheel_pruning.py replaces the PyPI-specific test. It pins the prune behaviour and asserts that every file under .gitlab/ running a publish command also calls the prune script, so a new upload path cannot silently reintroduce cp315.
def36ad to
1a43844
Compare
38c0fae to
4216070
Compare
Monitoring inject_hook already works. The wrap raise tests are skipif below NEXT and would demand a raise after wrap lift; they do not pin this PR error-string change.
|
Superseded by 69baea3 |
| import ddtrace.internal.wrapping.generators # noqa: F401 | ||
|
|
||
|
|
||
| @pytest.mark.skipif(PYTHON_VERSION_INFO < NEXT_PY_VERSION_INFO, reason=f"{NEXT_PY_VERSION} wrap() degrade") |
There was a problem hiding this comment.
@vlad-scherbich to figure out / revert removal of these tests
eccdecb to
89c0335
Compare
Description
NEXT_PY_UNSUPPORTED_MSGnow interpolatessys.version_info[:2], so wrapping and bytecode-injection raises becomeThis version of CPython is not supported yet: 3.15(or whatever is running). 3.15 remains unsupported;requires-pythonis unchanged.Testing
tests/internal/test_py315_import_degrade.pypins the new wording on the constant. It does not assert wrap() or inject_hook raises: monitoring inject_hook already works, and wrap raise is not this PR.Risks
None.
Additional Notes
Internal error string only.
changelog/no-changelog. Base: #19880. Wrap lift is #19910 (onmain) / #19928 on this stack.