chore(ci): enable Python 3.15 support for dramatiq - #19909
Conversation
Codeowners resolved asResolved from the full PR diff against |
Dependency direction analysis
|
Circular import analysis
|
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmark execution time: 2026-09-04 21:34:38 Comparing candidate commit 2542bca in PR branch Found 0 performance improvements and 8 performance regressions! Performance is the same for 577 metrics, 10 unstable metrics, 3 known flaky benchmarks, 15 flaky benchmarks without significant changes.
|
9f96d0a to
57afb96
Compare
801e339 to
19654b8
Compare
530a2f5 to
680d8a6
Compare
## Description This PR was done with codex. While trying to enable CI for Python 3.15 support in #19909, I came across a bunch of tests that failed because they are missing the lock file/requirements. Note that Codex found that we have to use `pip<25.3` for now because newer versions of pip with `pip-tools 7.5.2` (what dd-trace-py uses right now), it throws `ImportError: cannot import name stdlib_pkgs from pip._internal.utils.compat`. ## Testing - Built `docker/Dockerfile` locally successfully. - Verified `python3.15 -m piptools compile --help` succeeds in the rebuilt image. ## Risks None to tracer runtime code. This changes only testrunner build tooling. ## Additional Notes This is temporary until Python 3.15 is out. Co-authored-by: vlad.scherbich <vlad.scherbich@datadoghq.com>
c224d64 to
24f53a0
Compare
4d0ca17 to
746d444
Compare
9029a3c to
964e4f5
Compare
964e4f5 to
afdea50
Compare
Extends the latest-package dramatiq Riot environment from Python 3.14 through 3.15 (3.9-3.14 coverage preserved), adds the generated 3.15 lockfile, and fixes the Python 3.12+ coverage/bytecode-injection instrumentation module so it imports cleanly under 3.15. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
79863b6 to
e5db292
Compare
These lines are leftovers from an unrelated PR stack and don't belong in the dramatiq Python 3.15 support change.
These weren't meant as durable AIDEV anchors, just explanatory comments.
Co-authored-by: Vlad Scherbich <vlad.scherbich@datadoghq.com>
Co-authored-by: Vlad Scherbich <vlad.scherbich@datadoghq.com>
Co-authored-by: Vlad Scherbich <vlad.scherbich@datadoghq.com>
emmettbutler
left a comment
There was a problem hiding this comment.
Looks good aside from the huge comment
- inline _decoded_import_name into iter_import_events (single consumer) - slim verbose comment explaining the 3.15 injection gap - mark test skip reason with TODO(py-315)
…-dramatiq-py315-clean-tmp # Conflicts: # ddtrace/internal/coverage/import_instrumentation_py3_12.py
…dramatiq-py315-clean-tmp
Base is now vlad/py315-riotfile, which adds (3, 15) to SUPPORTED_PYTHON_VERSIONS, so select_pys(max_version="3.15") already covers the full 3.9-3.15 range.
There was a problem hiding this comment.
The new Python 3.15 Dramatiq lock pins 2.2.0. The Riot environment requests the latest release, and the other changed lockfiles and registry use 2.2.1.
🤖 Datadog Autotest · Commit 06c5be1 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
The lock generated when 3.15 support was added still pinned dramatiq 2.2.0, one release behind the 2.2.1 lock used on 3.9-3.14. Flagged by Datadog Autotest.
There was a problem hiding this comment.
More details
The Python 3.15 Dramatiq matrix agrees with the generated dependency files and the coverage fallback. The static review identifies no concrete regression.
🤖 Datadog Autotest · Commit 2542bca · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Description
Builds on #19879, which already enabled Dramatiq testing on Python 3.14 and added the
17f991elockfile. This PR will unblock the integrations CI for dramatiq (and later other integrations).This PR enables the next runtime only:
Related PRs:
ci(testrunner): install pip-tools for Python 3.15 #19977
ci: update testrunner image #19984
Testing
scripts/lint fmt -- riotfile.pyscripts/lint riotscripts/lint checksscripts/run-tests --list tests/contrib/dramatiq/confirms the existing Python 3.14 venv17f991eand new Python 3.15 venv41125444112544with Riot under Python 3.15; the lockfile was unchangedRisks
Low integration risk because this changes only Dramatiq Riot coverage and generated metadata. Python 3.15 remains enabled per integration while the global matrix stays capped at 3.14.
Additional Notes
main.PIP_IGNORE_REQUIRES_PYTHON=1override because the package metadata still declaresRequires-Python <3.15.Historical CI error for 3.15
Issue 1: Injection Assembly errors (fixed in this PR)

There's 174 failures at the moment:
Based on https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/jobs/1995599108 , we can't use INJECTION_ASSEMBLY
Issue 2: Lock files
Regenerated after the pip-tools PR.