Add free-threaded CPython (3.14t) support - #858
Open
kumaraditya303 wants to merge 3 commits into
Open
Conversation
- Mark all Cython extensions with freethreading_compatible=True so the interpreter no longer re-enables the GIL when numcodecs is imported - Require Cython>=3.1, needed for the freethreading_compatible directive - blosc: replace the lazily created multiprocessing.Lock (and get_mutex()) with a module-level threading.Lock, reset in forked children via os.register_at_fork - blosc: take the lock in _init, _destroy, set_nthreads and the global context path of decompress, so blosc_set_nthreads cannot re-create the global context while another thread is using it - blosc: compute the compressor list once at import; blosc_list_compressors() fills a static buffer without locking and was called on every compress() - CI: add 3.14t to the test matrix, installing without pcodec, zfpy and google_crc32c which do not ship free-threaded wheels yet - Wheels: enable cpython-freethreading in cibuildwheel, build cp314t-* wheels, and assert in the wheel test that the GIL is not re-enabled on free-threaded builds
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #858 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 905 905
=========================================
Hits 905 905 🚀 New features to boost your workflow:
|
Author
|
I dropped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I am a CPython Core Developer working on free-threading support. This PR adds support for free-threading on 3.14t+ (#749).
Changes:
TODO: