feat: support free-threaded CPython 3.14 - #111
Merged
Merged
Conversation
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.
Summary
cp314twheels on Linux, macOS, and WindowsPy_GIL_DISABLEDexplicitly for Windows free-threaded buildsThe existing Cython
nogilregions intentionally remain. Under free-threaded CPython they still detach Python thread state around native-only work, and under regular CPython they are what allows independent detector calls to execute concurrently.Performance
CPython 3.14.2 free-threaded, preloaded 160-file / 99,819-byte uchardet corpus, rigorous pyperf runs:
Regular CPython 3.14.2 remained effectively unchanged: 30.2→30.3 ms serial and 9.39→9.38 ms with four threads.
Validation
-Werrorand leavessys._is_gil_enabled()falsedetect()anddetect_all()cp314-cp314t-linux_x86_64wheel builds, installs into a clean 3.14t uv environment, and passes the wheel smoke testReferences