Conversation
Adds build support for Python Free-Threading (PEP 779). Wheels will be created for macOS and Linux will create a compatible extension binary if installed under a free-threaded enabled interpreter.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds build and CI support for Python Free-Threading (PEP 779), enabling the library to create free-threading-compatible extension modules when built under a free-threaded Python interpreter (denoted by the "t" suffix, e.g., 3.14t). The changes focus on build-time detection and configuration rather than runtime thread-safety guarantees.
Key Changes:
- Detection of free-threaded Python environments via
sysconfig.get_config_var("Py_GIL_DISABLED")with automatic disabling of Limited API (which is incompatible with free-threading) - Conditional enabling of Cython's
freethreading_compatiblecompiler directive when building under free-threaded Python - CI workflow additions to build and test Python 3.14t wheels for macOS (both x86_64 and arm64 architectures)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Adds free-threading detection logic, disables Limited API for free-threaded builds, and conditionally enables Cython's freethreading_compatible directive |
| setup.cfg | Adds Python Free Threading trove classifier indicating beta-level support |
| README.md | Documents free-threading support, testing status, and platform-specific wheel availability with clarification about thread-safety limitations |
| CHANGELOG.md | Records the addition of free-threading support for version 0.9.0 |
| .github/workflows/ci.yml | Adds macOS wheel builds and test matrix entries for Python 3.14t (free-threaded) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Adds build support for Python Free-Threading (PEP 779). Wheels will be created for macOS and Linux will create a compatible extension binary if installed under a free-threaded enabled interpreter.