-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add free-threaded Python support (#2809)
Co-authored-by: Bernát Gábor <[email protected]>
- Loading branch information
1 parent
bc7a91a
commit b00d59c
Showing
25 changed files
with
306 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
py: | ||
- "3.13t" | ||
- "3.13" | ||
- "3.12" | ||
- "3.11" | ||
|
@@ -77,27 +78,41 @@ jobs: | |
shell: bash | ||
run: echo ~/.local/bin >> $GITHUB_PATH | ||
- name: Install tox | ||
if: matrix.py == '3.13' | ||
if: matrix.py == '3.13' || matrix.py == '3.13t' | ||
run: uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv | ||
- name: Install tox | ||
if: matrix.py != '3.13' | ||
if: "!(matrix.py == '3.13' || matrix.py == '3.13t')" | ||
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv | ||
- name: Setup brew python for test ${{ matrix.py }} | ||
if: startsWith(matrix.py,'brew@') | ||
if: startsWith(matrix.py, 'brew@') | ||
run: | | ||
set -e | ||
PY=$(echo '${{ matrix.py }}' | cut -c 6-) | ||
brew cleanup && brew upgrade python@$PY || brew install python@$PY | ||
echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}" | ||
shell: bash | ||
- name: Setup python for test ${{ matrix.py }} | ||
if: "!( startsWith(matrix.py,'brew@') || endsWith(matrix.py, '-dev') )" | ||
if: "!(startsWith(matrix.py, 'brew@') || endsWith(matrix.py, 't'))" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
allow-prereleases: true | ||
# quansight-labs to install free-threaded python until actions/setup-python supports it | ||
# https://github.com/actions/setup-python/issues/771 | ||
- name: Setup python for test ${{ matrix.py }} | ||
if: endsWith(matrix.py, 't') | ||
uses: quansight-labs/[email protected] | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Pick environment to run | ||
if: matrix.py != '3.13t' | ||
run: python tasks/pick_tox_env.py ${{ matrix.py }} | ||
- name: Pick environment to run | ||
if: matrix.py == '3.13t' && runner.os != 'Windows' | ||
run: python tasks/pick_tox_env.py ${{ matrix.py }} $Python_ROOT_DIR/bin/python | ||
- name: Pick environment to run | ||
if: matrix.py == '3.13t' && runner.os == 'Windows' | ||
run: python tasks/pick_tox_env.py ${{ matrix.py }} $env:Python_ROOT_DIR\python.exe | ||
- name: Setup test suite | ||
run: tox run -vv --notest --skip-missing-interpreters false | ||
- name: Run test suite | ||
|
This file contains 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 @@ | ||
Add support for selecting free-threaded Python interpreters, e.g., `python3.13t`. |
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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
Oops, something went wrong.