-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: improve support for free-threaded CPython #621
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rgommers for looking into this. This will be important as soon as the first Python 3.13 is out and more people starts testing the nogil interpreter.
Looks like a typo fix in
gh-613 has a draft fix already, but with more changes. Do you want to finish that PR, or should we fix this typo failure separately first? |
64bbf42
to
ef51f8a
Compare
This should be fixed in main already. I think you just need to rebase on current main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just a couple of minor things.
The free-threaded CPython build does not support the limited API yet, and won't in the near future. To avoid either cryptic build failures or a successfull build yielding an `abi3` tag which would not be correct, raise a clear error and don't attempt to build.
Support for free-threaded CPython in Cython is still a work in progress, see e.g. cython#6137 - this will land in Cython 3.1.0, and the skipped test does pass when using Cython built from the branch in cython#6137.
90d633e
to
800eca7
Compare
As noted in pypa/packaging#727, free-threaded CPython does not support the limited API. Hence raise an exception if a
limited-api
build is requested.Also skip/update a few tests that were failing when run under a free-threaded interpreter.
Note that we are already producing the correct wheel tags, since that comes from
sysconfig.get_config_var('EXT_SUFFIX')
.Addresses part of gh-499. There will be more to do - most importantly adding a CI job. This probably only makes sense to do once the
setup-python
action adds support (xref actions/setup-python#771). This may happen around the CPython 3.13 beta 1 release (May 7th).I'll add notes on how to test with a free-threaded build on gh-499 (it's not completely trivial yet).