Add initial support for abi3.abi3t tag from PEP 803#5193
Add initial support for abi3.abi3t tag from PEP 803#5193
Conversation
|
I'll do another pass next week to get the tests passing here. In the meantime, I'd appreciate comments. |
|
In order to make the diff coverage happy, I'll probably need to:
I'm going to punt on that for now but I hope to come back to that. I also think free-threaded CI coverage is probably needed independent of the PEP 803 work. |
|
Actually, on second thought, I think I might be able to use |
|
Fun! It looks like a |
|
I looked at Python 3.15 testing a bit today and ran into ronaldoussoren/pyobjc#671. Even if that isn't a problem on CI, the full pyobjc dependency tree takes quite a while to build, so any 3.15 testing will be Linux-only for now probably. It probably does make sense to add an abi3t test extension that requires Python 3.15 or newer, but I'm going to punt on that for now. Besides that issue, all code in this PR is tested. |
rgommers
left a comment
There was a problem hiding this comment.
Thanks for working on this @ngoldbaum. Overall this PR looks solid, I only found one minor issue in one of the added tests in test_build_ext.py.
| Extension( | ||
| name="extension", | ||
| sources=["extension.c"], | ||
| py_limited_api=True |
There was a problem hiding this comment.
This change looks correct and is a bug fix for the existing test, which didn't quite make sense before - I think given the test_limited_abi test name, it was intended to test the Limited API indeed.
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
I marked this ready for review and updated the PR description. @jaraco @abravalheri I'd love your opinions on this. |
Summary of changes
Fixes #5205
PEP 803 proposes a free-threaded stable ABI. I'm working on ecosystem support for a free-threaded stable ABI and end-to-end tests for PEP 803. PEP 803 was accepted in March and there will be support for it in Python 3.15.
This PR is set up to require a free-threaded build to produce abi3.abi3t wheels. It does this by making builds where
py_limited_api=Trueis set on the free-threaded build on 3.15 or newer produce abi3t extensions and abi3.abi3t wheels.In principle it's possible to do this on the GIL-enabled build as well but it'll require at least a new
Extensionkeyword argumentpy_target_abi3t=Truemaybe?As far as I can tell,
py_limited_apiis undocumented, so this doesn't add new docs, although I'd be happy to explore that if you'd like to see docs for this.Pull Request Checklist
newsfragments/.(See documentation for details)