find-cpython-usage
/find-cpython-usage
Wyszukuje nagłówki i struktury CPython używane w kodzie, zwłaszcza w profilowaniu, przy obsłudze nowej wersji Pythona.
- Autor
- DataDog ↗
- Repozytorium
- dd-trace-py ↗
- Licencja
- BSD-3-Clause
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
BSD-3-Clause, otwarta.
Co robi i kiedy
Wyszukuje nagłówki i struktury CPython używane w kodzie, zwłaszcza w profilowaniu, przy obsłudze nowej wersji Pythona.
Oryginalny opis (EN)
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.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 43 linii, 240 słów
Podgląd SKILL.md
---
name: find-cpython-usage
description: >
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.
allowed-tools:
- Bash
- Read
- Grep
- Glob
- TodoWrite
---
# Inventory CPython dependencies
For a Python-version change, start with the native extensions listed in `setup.py` and their
CMake/Cargo inputs. Search tracked C, C++, Cython, and Rust sources, including declarations in
`.pxd` files and code under both `ddtrace/` and `src/`.
```bash
rg -n -g '*.{c,cc,cpp,h,hh,hpp,pyx,pxd,rs}' \
'Python\.h|cpython[/.]|internal/pycore|pyo3(_ffi|::ffi)' ddtrace src
rg -n -g '*.{c,cc,cpp,h,hh,hpp,pyx,pxd,rs}' \
'PyFrameObject|PyThreadState|PyInterpreterState|PyCodeObject|_PyInterpreterFrame' ddtrace src
rg -n -g '*.{c,cc,cpp,h,hh,hpp,pyx,pxd,rs}' \
'PyGenObject|PyCoro_CheckExact|PyAsyncGenASend|FutureObj|TaskObj' ddtrace src
```
These searches are seeds, not an exhaustive API detector. Follow wrappers, aliases, generated
bindings, struct field reads, and version guards in the affected extensions. Distinguish vendored
code from code owned here, and public APIs from unstable internals.
Include generator/coroutine state, async-generator wrappers, and asyncio task/future layouts.
For examples of copied layouts and version guards, inspect
`ddtrace/internal/datadog/profiling/stack/echion/echion/cpython/tasks.h` and its callers.
Distinguish CPython's public `Include/` headers, CPython-specific `Include/cpython/` headers,
and private `Include/internal/pycore*.h` headers. Check the target version's guards and include
order for `Py_BUILD_CORE`; see `ddtrace/profiling/collector/_memalloc_frame.h` for a local example.
Within each affected extension, find field reads and layout-dependent copies as well as API calls:
```bash
rg -n -g '*.{c,cc,cpp,h,hh,hpp,pyx,pxd,rs}' -- \
'(->|\.)(f_|co_|gi_|cr_|ag_|task_|future_)|offsetof\(|sizeof\(|copy_type\(' <affected-native-directory>
```
Follow each matching object's type back to its declaration, including aliases and locally copied
CPython structs. Check fields accessed through macros or helper functions too; the pattern above
does not cover every field name or access form.
Record each relevant header, symbol or field, source location, supported-version guard, and
lifetime/locking assumption. Pass that inventory to
[compare-cpython-versions](../compare-cpython-versions/SKILL.md); avoid maintaining a static symbol list.
Wersje
W bazie nie ma innych skilli o nazwie find-cpython-usage.
Migawka bazy z 13.11.2026 · wersja paczki a45bf6702d18 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 96compare-cpython-versions
Porównuje kod źródłowy CPython między dwiema wersjami Pythona, wskazując zmiany w nagłówkach i strukturach. - 100uv-python-versions
Instaluje wersje interpretera Pythona i zarządza nimi przez uv: .python-version, polecenie uv python oraz CPython i PyPy. - 100backport
Przenosi scaloną zmianę CPython do gałęzi utrzymaniowej (3.14, 3.13 i inne) jako gałąź w konwencji cherry_picker i proponuje otwarcie PR z backportem. - 100dev
Orientuje w repozytorium CPython przy naprawie błędów, dodawaniu funkcji i wkładzie do projektu oraz dobiera wyspecjalizowane skille: build, styl, dokumentacja, backport i scan-triage. - 100pyright-issue-analysis
Bada zgłoszenia w Pyright na podstawie minimalnych repro, semantyki CPython, specyfikacji typowania i porównań z mypy, na potrzeby triage, odpowiedzi opiekunów i poprawek. - 90python-native-extension-interop
Statycznie przegląda natywne rozszerzenia Pythona (CPython C API, Cython, PyO3 i Rust): własność referencji, stabilne ABI, bezpieczeństwo buffer protocol, tłumaczenie wyjątków i gotowość na GIL.