(Cross-posting here on @pf_moore’s suggestion. Please comment on the original post.)
I’ve posted a proposal to add a few functions to the stable ABI, which will allow cp313-abi3 stable ABI wheels to be supported by both the default 3.13+ CPython builds and the (experimental) --disable-gil builds.
Here’s my packaging tools focused summary:
cp313-abi3wheels will work with CPython 3.13+ default and experimental--disable-gilbuilds.- Older stable ABI wheels will continue to work with the default build, but not the experimental
--disable-gilbuild. - As is currently the case,
cp313-abi3wheels would not work with older (pre 3.13) versions of CPython. pypa/packagingwould need to be updated to platform tags for--disable-gilbuilds.- Toosl like
pip,poetry, andhatchthat usepypa/packagingwould need to update their version ofpypa/packagingto work correctly with the experimental--disable-gilbuild. - A new field
sys.implementation.abi_disable_gilto identify--disable-gilbuilds from the default (with GIL) build .
Here’s my summary for maintainers of extensions that use the stable ABI:
- Extensions maintainers that wish to support the experimental
--disable-gilbuild will need to provide a wheel that targets the cp313-abi3 stable ABI (i.e., the Python 3.13 limited API). In practice, since they are likely to also support older versions of Python, this means building an extra wheel per platform. But the number of wheels would not further increase in 3.14 and later versions. (This is slightly improved compared to PEP 703). If they do not care to support the--disable-gilbuild, then no changes are necessary.
Here’s my summary for maintainers of extensions that do not use the stable ABI:
- Extensions maintainers that wish to support the experimental
--disable-gilbuilds will need to build an extra wheels per platform (essentially unchanged from PEP 703). If they do not care to support the--disable-gilbuild, then no changes are necessary.