Skip to content

tiran/tiran-skills

unversioned · 0c51c24122b3

Portable, agent-neutral coding skills and playbooks (Python packaging, PyTorch), auto-discovered under skills/.

port-to-python-limited-api

Port a hand-written C/C++ CPython extension from the version-specific C API to the Limited API (Py_LIMITED_API) so one stable-ABI abi3 wheel loads on every later Python instead of one per version — and optionally target Python 3.15 abi3t (PEP 803 + PEP 793 PyModExport) for a single wheel across GIL-enabled and free-threaded builds. Covers the usual first step of converting static PyTypeObject types to heap types (PyType_FromSpec / PyType_Slot), module state, multi-phase init, API substitutions, and the build flags / abi3 / abi3.abi3t wheel tags for meson-python, scikit-build-core, maturin, and setuptools. Use to adopt the limited API / stable ABI / abi3 / abi3t, stop rebuilding a C extension per Python version, or convert static types to heap types. Not for pybind11/nanobind (see pybind11-to-nanobind) or the PyTorch C++ ABI (see port-to-torch-stable-abi).

Read SKILL.md at the source

Pinned to revision 0c51c24122b3, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.