-
-
Notifications
You must be signed in to change notification settings - Fork 107
Add support for 3.14 free-threaded #266
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
Conversation
Because cffi 2.0 only supports no-GIL interpreters >= 3.14
ngoldbaum
left a comment
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.
I think it should be possible to support 3.13t as well, but without supporting the CFFI backend.
I'm not sure if @indygreg wants to see more substantial changes to the library's thread safety guarantees before adding free-threaded support. Assuming he's fine with the currently documented limitations then this is probably fine.
Also you should probably add a trove classifier for free-threaded support.
setup.py
Outdated
| # versions. | ||
| MINIMUM_CFFI_VERSION = "1.17" | ||
| # Require 2.0 for improved free-threading support | ||
| MINIMUM_CFFI_VERSION = "2.0" |
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.
Consider only requiring this on Python 3.14 or newer. Here's how I did that in cryptography: https://github.com/pyca/cryptography/pull/12555/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R8
This reverts commit 3526647.
* Split `cffi` depedency into two cases: 1.17 for versions up to 3.13, 2.0 for 3.14+ * Skip building cffi backend for 3.13t
|
I'd also consider moving the PyO3 update into its own PR that this PR depends on, since I think @indygreg prefers to review PRs that only do one thing at a time. |
Should resolve #231