Skip to content

chore: include the running CPython version in the unsupported error (PROF-14439) - #19911

Open
vlad-scherbich wants to merge 4 commits into
vlad/no-cp315-to-pypifrom
vlad/py315-unsupported-msg
Open

chore: include the running CPython version in the unsupported error (PROF-14439)#19911
vlad-scherbich wants to merge 4 commits into
vlad/no-cp315-to-pypifrom
vlad/py315-unsupported-msg

Conversation

@vlad-scherbich

@vlad-scherbich vlad-scherbich commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

NEXT_PY_UNSUPPORTED_MSG now interpolates sys.version_info[:2], so wrapping and bytecode-injection raises become This version of CPython is not supported yet: 3.15 (or whatever is running). 3.15 remains unsupported; requires-python is unchanged.

Testing

tests/internal/test_py315_import_degrade.py pins 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 (on main) / #19928 on this stack.

@vlad-scherbich vlad-scherbich added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 28, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against vlad/no-cp315-to-pypi using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.gitlab/scripts/prune-unsupported-wheels.sh                             @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/compat.py                                              @DataDog/python-guild @DataDog/apm-core-python
tests/internal/test_py315_import_degrade.py                             @DataDog/apm-core-python

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 28, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 240 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 240 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.llmobs._integrations.claude_agent_sdk -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.debugging._exception.replay -×-> ddtrace.trace  (product:debugging -> product:tracing, score=133)
ddtrace.llmobs._integrations.litellm -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._integrations.vertexai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0082495 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Aug 28, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-30 03:20:20

Comparing candidate commit 0082495 in PR branch vlad/py315-unsupported-msg with baseline commit 1a43844 in branch vlad/no-cp315-to-pypi.

📊 Benchmarking dashboard

Found 0 performance improvements and 8 performance regressions! Performance is the same for 578 metrics, 10 unstable metrics, 18 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+2.505µs; +2.666µs] or [+14.847%; +15.799%]

scenario:iastaspects-add_aspect

  • 🟥 execution_time [+10.427µs; +13.268µs] or [+10.632%; +13.529%]

scenario:iastaspects-repr_aspect

  • 🟥 execution_time [+75.412µs; +82.640µs] or [+21.201%; +23.233%]

scenario:iastaspects-upper_aspect

  • 🟥 execution_time [+57.625µs; +66.133µs] or [+23.655%; +27.147%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+139.212µs; +148.086µs] or [+35.923%; +38.213%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+38.408µs; +43.624µs] or [+26.455%; +30.048%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+636.936ns; +671.706ns] or [+23.396%; +24.673%]

scenario:tracer-small

  • 🟥 execution_time [+29.367µs; +31.853µs] or [+8.761%; +9.503%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-693.022ns; +770.761ns] or [-6.342%; +7.054%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-38.231ns; +28.188ns] or [-6.224%; +4.589%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1395.044ns; +1873.153ns] or [-8.323%; +11.175%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-946.465ns; +1537.948ns] or [-7.382%; +11.996%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-270.803ns; +375.197ns] or [-7.488%; +10.374%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-194.542ns; +310.743ns] or [-6.767%; +10.809%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-67.878ns; +80.638ns] or [-5.796%; +6.886%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-4155.193ns; +3751.151ns] or [-10.206%; +9.214%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-893.004ns; +644.527ns] or [-10.958%; +7.909%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-44.310µs; +38.509µs] or [-7.092%; +6.164%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

Known flaky benchmarks without significant changes:

  • scenario:errortrackingflasksqli-baseline
  • scenario:flasksimple-iast-get
  • scenario:iastaspects-casefold_aspect
  • scenario:iastaspects-casefold_noaspect
  • scenario:iastaspects-index_aspect
  • scenario:iastaspects-ljust_noaspect
  • scenario:iastaspects-lower_aspect
  • scenario:iastaspects-replace_aspect
  • scenario:iastaspects-swapcase_aspect
  • scenario:iastaspects-title_noaspect
  • scenario:iastaspects-translate_aspect
  • scenario:iastaspects-translate_noaspect
  • scenario:iastaspects-upper_noaspect
  • scenario:packagespackageforrootmodulemapping-cache_off
  • scenario:packagespackageforrootmodulemapping-cache_on
  • scenario:sethttpmeta-all-enabled
  • scenario:span-start
  • scenario:telemetryaddmetric-record-100-metrics

@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-unsupported-msg branch 2 times, most recently from 0f7f01c to 38c0fae Compare August 28, 2026 14:57
@vlad-scherbich
vlad-scherbich changed the base branch from main to vlad/no-cp315-to-pypi August 28, 2026 14:58
@vlad-scherbich
vlad-scherbich marked this pull request as ready for review August 28, 2026 16:10
@vlad-scherbich
vlad-scherbich requested review from a team as code owners August 28, 2026 16:10
@vlad-scherbich
vlad-scherbich requested review from brettlangdon and removed request for a team August 28, 2026 16:10
@vlad-scherbich
vlad-scherbich force-pushed the vlad/py315-unsupported-msg branch from 38c0fae to 4216070 Compare August 28, 2026 18:31
@vlad-scherbich vlad-scherbich changed the title chore: include the running CPython version in the unsupported error chore: include the running CPython version in the unsupported error (PROF-14439) Aug 28, 2026
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.
#19861 only makes cp315 optional in the package validator. Un-prune after
IMAGE_TAG can build a correct wheel, and only once 3.15 is supported.

(cherry picked from commit 703428b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant