You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] Support building extensions and wheels with the abi3t ABI (PEP 803) #5205
The steering council approved PEP 803 and Python 3.15 will support a new abi3t ABI. Extensions built using this ABI can be imported on both the free-threaded and GIL-enabled builds of CPython.
Adding support for building these extensions and wheels will allow projects using setuptools to reduce their maintenance burden and build one wheel for both Python 3.15 builds and automatically support 3.16 and newer when those builds are released.
Require a free-threaded interpreter to build abi3t wheels
The main benefit of this approach is it doesn't require any new UI in setuptools. We would repurpose the py_limited_api keyword argument for Extension and bdist_wheel option so that if they are set and the build is happening with a free-threaded interpreter, setuptools will produce .abi3t.so extension files on posix platforms and abi3t.abi3 wheels on all platforms.
Add new UI for choosing between abi3 and abi3t builds.
There is nothing special about the free-threaded interpreter for these builds and it's possible to produce abi3t extensions and wheels using a GIL-enabled interpreter. But because we don't want to break existing abi3 builds on GIL-enabled interpreters, I think we would need to have some way of opting in to abi3t builds. This probably requires a new Extension keyword argument.
Alternative Solutions
I'm not sure there is an alternative for users of setuptools who want to do these builds.
Additional context
I'm available on the PyPA discord if you want to have lower-latency chats about this topic.
Code of Conduct
I agree to follow the PSF Code of Conduct
Reacted by Ralf Gommers, Matthieu Darbois and Manuel López-Ibáñez
These are not mutually exclusive, your PR for the first option is the minimum that's required - so I'd focus on that first. Adding a new keyword to allow building abi3t wheels on a GIL-enabled interpreter is an extra capability that may be nice to have in the future, but isn't required for allowing setuptools users to start shipping abi3t wheels. So probably best left to a follow-up PR even if the maintainers want to add this?
Activity
rgommers commentedon Apr 2, 2026
These are not mutually exclusive, your PR for the first option is the minimum that's required - so I'd focus on that first. Adding a new keyword to allow building
abi3twheels on a GIL-enabled interpreter is an extra capability that may be nice to have in the future, but isn't required for allowingsetuptoolsusers to start shippingabi3twheels. So probably best left to a follow-up PR even if the maintainers want to add this?