Skip to content

Quansight-Labs/stable-abi-testing

Repository files navigation

Python Stable ABI Testing

This repository contains example packages for testing the new limited API proposals, along with a test suite. Currently, it uses the reference implementation of PEP 803 found in CPython 3.15.0a2.

Implementation notes

This is a work-in-progress, based on the state as of 2026-03-05. Whenever possible, official or semi-official support is used. Elsewhere, hacks are employed, or the packages are as close to the new API as currently possible.

  • In packages using the C API, the new limited API is enabled via setting -D_Py_OPAQUE_PYOBJECT as required by Python 3.15.0 alphas. According to PEP 803, the final implementation should not require this. This is also done on packages that have explicit switches for limited API, since these do not account for PEP 803.
  • A minimal fork of meson-python is used, in order to remove the explicit check that blocks disabling GIL while using limited API.
  • A preview freethreading-limited-api branch of Cython is used.
  • PyO3 does not support PEP 793 or PEP 803 yet. The test currently builds a limited API extension targeting Python 3.14. PyO3#5786.
  • nanobind has preliminary support for PEP 793 and PEP 803 in the abi3t branch. The test package uses regular limited API or freethreading API currently. nanobind#1187 nanobind#1284 .
  • A minimal fork of CFFI is used, to bypass code paths that do not allow limited API builds on the free-threaded build.
  • A minimal fork of packaging is used, to add support for the abi3t ABI tag.
  • A minimal fork of setuptools is used, to add support for the abi3t ABI tag and abi3.abi3t compressed tag set.

About

Projects to test the upcoming the Python stable ABI changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors