-
-
Notifications
You must be signed in to change notification settings - Fork 51k
CI: Upgrade to free-threaded Python 3.14t #15104
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
Merged
cclauss
merged 7 commits into
TheAlgorithms:master
from
priya-sundaram-dev:python-3.14t
Aug 31, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a9fc9e3
ci: switch default Python to free-threaded 3.14t
priya-sundaram-dev 265c8a7
ci(3.14t): gate opencv-python into optional 'cv' group + skip cv2 files
priya-sundaram-dev 53d6a74
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 981259c
ci(3.14t): add --ignore-gil-enabled so sklearn/xgboost imports don't …
priya-sundaram-dev c12f697
ci(3.14t): gate qiskit into an optional group like opencv
priya-sundaram-dev 09d228b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 64e8e32
ci: single-source 3.14t via .python-version; declare Free Threading :…
priya-sundaram-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,7 +73,6 @@ target/ | |
| .ipynb_checkpoints | ||
|
|
||
| # pyenv | ||
| .python-version | ||
|
|
||
| # celery beat schedule file | ||
| celerybeat-schedule | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.14t |
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
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.
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.
and restore
python-version-file: pyproject.tomlin all workflows.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.
Both of these turn out to be blocked by tooling constraints rather than choices, so I left them as-is — details below in case it's useful:
target-version = "py314t"— ruff doesn't accept a free-threaded target. On ruff 0.15.21:target-versionis the language version (it gates which syntax/lint rules apply), and free-threading doesn't change the language — 3.14 and 3.14t parse identically. Sopy314is correct here andpy314twould fail the config parse in every ruff run.python-version-file: pyproject.toml—setup-pythonresolves that file viaproject.requires-python, which is semver, and3.14tisn't valid semver (see actions/setup-python#973 — thetsuffix is pyenv/wheel notation, not semver). Sorequires-python = ">=3.14"would install the GIL build, not the free-threaded one, which defeats the PR. The only version-file that can carry3.14tis.python-version, but that's gitignored here (.gitignore:76) by convention so contributors can keep a local pin without committing it. That's why I used the explicitpython-version: 3.14t— it's the minimal way to actually select the free-threaded interpreter in CI.If you'd rather single-source it across the 4 workflows anyway, I'm happy to un-ignore
.python-version, pin it to3.14t, and switch them all topython-version-file: .python-version— that keeps the diffs small and gives one place to bump. Just let me know if the gitignore-convention change is worth it to you and I'll push it.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.
Nice detective work!! Please un-ignore .python-version, pin it to 3.14t, and switch them all to python-version-file: .python-version.
Also, we should declare that we are free-threaded beta https://py-free-threading.github.io/porting/#define-and-document-thread-safety-guarantees