Compare CPython source code between two Python versions to identify changes in headers and structs. Use this when adding support for a new Python version to understand what changed between versions.
Use the CPython dependency inventory to scope this work.
Resolve exact old/new tags or commits; distinguish a release tag from a moving development branch.
Use an existing CPython checkout when available, or a separate checkout of
https://github.com/python/cpython. Do not switch the user's working checkout to inspect another ref.
Run in the CPython checkout, substituting verified refs and paths:
git diff <old-ref> <new-ref> -- <relevant-header-or-source>
git log <old-ref>..<new-ref> -- <relevant-header-or-source>
git log -p <old-ref>..<new-ref> -S '<changed-symbol>' -- Include Python Objects ModulesUse the inventory to check these change categories; this is not an exhaustive compatibility checklist:
For local examples, inspect ddtrace/internal/datadog/profiling/profiling_helpers/version_compat.h
and frame_accessors.h in that directory: they handle moved interpreter-frame headers and different
representations of the frame's executable field. Verify each comparison against the selected versions.
Inspect implementations as well as declarations: layouts, ownership, GIL requirements, finalization, and error behavior can change without a signature change. Use the exact revision's source, What's New notes, and linked upstream issues to explain each relevant difference.
Follow gh-<number> or issue references in introducing commits to the CPython issue/PR and any
linked PEP. ddtrace/internal/datadog/profiling/stack/echion/echion/cpython/tasks.h cites gh-123923
for stack references; a proposal or release-note summary does not replace source verification.
Connect each changed field or API to ddtrace's reads, macros, offsets, copies, and callers. Record the old/new contract, replacement or adaptation, required version guard, and affected files; include caller and upstream source links so the proposed changes can be checked.
Report affected ddtrace callers, the changed contract, required adaptation, and validation across the supported versions/platforms. Treat pre-release behavior as version-specific; do not turn a snapshot into an undated universal rule.
DataDog/dd-trace-py
4adf35e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.