Skip to content
Skills Library
Programming · Analysis

compare-cpython-versions

/compare-cpython-versions

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.

Repository
dd-trace-py ↗
Licence
BSD-3-Clause
Last repository change
27.10.2026

Assessment and security

96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content31 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

BSD-3-Clause, otwarta.

What it does and when to use it

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.

Original author description

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.

How it works

SKILL.md has no level-two headings · 43 lines, 318 words

SKILL.md preview
---
name: compare-cpython-versions
description: >
  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.
allowed-tools:
  - Bash
  - Read
  - Grep
  - WebSearch
  - TodoWrite
---

# Compare CPython versions

Use the [CPython dependency inventory](../find-cpython-usage/SKILL.md) 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:

```bash
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 Modules
```

Use the inventory to check these change categories; this is not an exhaustive compatibility checklist:

- Struct fields added, removed, renamed, reordered, or retyped, including pointer-to-tagged-reference
  changes, bitfields, alignment, and offsets used by copied layouts.
- Headers or declarations moved, split, or merged; changed include order, guards, and build macros.
- Functions or macros added, removed, or deprecated; changed signatures, replacements, and contracts.

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.

Versions

The database has no other skills named compare-cpython-versions.

Database snapshot: 13.11.2026 · package version 9428d26da0fd (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100uv-python-versions
    Install and manage Python interpreter versions with uv. Use when the user mentions installing Python versions, .python-version, uv python, or managing CPython/PyPy.
  • 91find-cpython-usage
    Find all CPython internal headers and structs used in the codebase, particularly for profiling functionality. Use this when adding support for a new Python version to identify what CPython internals we depend on.
  • 100backport
    Use this skill when backporting a merged CPython change to a maintenance branch (3.14, 3.13, etc.) - whether invoked as /cpython:backport <version> [PR], asked to backport or cherry-pick a fix from main, or handling a failed automated miss-islington backport. Produces a…
  • 96vllm-compare-reqs
    Use this skill to compare vllm requirements files between versions
  • 100dev
    Use this skill when working in the CPython repository for any development task - fixing bugs, adding features, understanding code, or making contributions. Provides codebase orientation and coordinates loading of specialized skills (build, style, docs, backport, scan-triage) as…
  • 90bench-compare
    Compare API performance across versions — regression detection and root cause analysis. Use when asked "did performance regress", "compare API latency across versions", or "why is this slower".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.