(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-abi3
wheels will work with CPython 3.13+ default and experimental--disable-gil
builds.- Older stable ABI wheels will continue to work with the default build, but not the experimental
--disable-gil
build. - As is currently the case,
cp313-abi3
wheels would not work with older (pre 3.13) versions of CPython. pypa/packaging
would need to be updated to platform tags for--disable-gil
builds.- Toosl like
pip
,poetry
, andhatch
that usepypa/packaging
would need to update their version ofpypa/packaging
to work correctly with the experimental--disable-gil
build. - A new field
sys.implementation.abi_disable_gil
to identify--disable-gil
builds 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-gil
build 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-gil
build, 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-gil
builds will need to build an extra wheels per platform (essentially unchanged from PEP 703). If they do not care to support the--disable-gil
build, then no changes are necessary.