Repository navigation
Fix abi3 suffixes for pre-3.15 wheel targets - #5390
LittleChenLiya wants to merge 2 commits into
Conversation
Pass the wheel's limited-API target to build_ext so older interpreters receive the unqualified suffix they can import.
atishay-kasliwal
left a comment
There was a problem hiding this comment.
Built a py_limited_api=True extension with bdist_wheel --py-limited-api=cp311 on Python 3.15. Master named it spam.abi3-darwin.so, which 3.13 and 3.14 can't import (their EXTENSION_SUFFIXES only have .abi3.so). Here it's spam.abi3.so, and it imports on 3.13, 3.14 and 3.15. For cp315 and up the platform-qualified suffix is kept.
|
Thanks for verifying this, @atishay-kasliwal. The `spam.abi3.so` result on 3.13/3.14/3.15 while keeping the platform-qualified suffix for `cp315+` is exactly the intended behavior. Let me know if anything else is needed from my side.
|
py_limited_api accepts an interpreter tag such as cp313t, so parsing the whole suffix as an int raised ValueError. Read the leading version digits instead so the 3.15 gate also works for free-threaded targets. Extend the regression to cp313t and cp315t.
|
Thanks again for the 3.13/3.14/3.15 verification, @atishay-kasliwal — the I also hardened the new target check in e08357e. Local validation: |
Summary of changes
Pass the
py-limited-apiwheel target tobuild_ext. Wheel targets older than Python 3.15 now receive unqualified stable-ABI extension suffixes that those interpreters can import. Python 3.15+ targets retain platform-qualified suffixes.Regression coverage checks
cp311,cp314, andcp315.Closes #5389
Pull Request Checklist
newsfragments/].