-
Notifications
You must be signed in to change notification settings - Fork 42
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
Can free-threading wheel builds be made available on PyPI? #119
Comments
As far as I can tell, CFFI will crash Python or corrupt memory if you force it to run in a free-threaded Python. That's why we don't provide free-threaded CFFIs. |
There are numerous issues to solve before CFFI has any real hope of "just working" under the In any case, we've been playing with it, and will continue to do so, but we absolutely will not be publishing CFFI wheels for the IMO unstable t-ABI wheels are just an attractive nuisance, providing a false sense of security to folks playing around that their code might actually be safe, and leading to a lot of bug report noise at this stage, since the typical failure mode is almost always either a hang or a segfault. I'm going to pin this issue to (hopefully) head off duplicates. PS, since I couldn't resist playing with it again: as of 3.13rc1 with a default-GIL-disabled Python build against the current |
(also see #126 for overall status on that stuff) |
I know from other issues/PRs (e.g., #40) that making cffi actually thread-safe is a big task. However, a small but easier step is to produce free-threaded wheels. As mentioned in https://docs.python.org/3.13/howto/free-threading-extensions.html#module-initialization
Thus, providing FT wheels doesn't necessarily mean the extension supports it, it simply allows the package to be installed in a FT installation.
I do understand that providing such wheels could make some users believe that cffi is fully multi-threaded. As long as expectations are made clear that hopefully shouldn't be an issue, but that's very easy to say.
In my case I'm trying to provide FT builds of my library (with hopefully actual thread-safe code), and cffi is an optional dependency (rarely used though from what I know). I'm not running multi-threaded code in my tests (yet), and even if I did python would should re-enable the GIL when importing cffi.
The text was updated successfully, but these errors were encountered: