Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Test on free-threaded Python
See #2005. Right now, this does not limit by operating system, but that is just to verify that there are no OS-specific 3.13t problems we should know about right now; once that is verified, the macOS and Windows jobs will be removed (excluded) for the time being. The 3.13t jobs added here use `Quansight-Labs/setup-python`, not `actions/setup-python`. The latter also has the ability to use 3.13t since actions/python-versions#319 and actions/setup-python#973 (see also actions/setup-python#771), but no version tag includes this feature yet. It can be used by using `@main` or `@...` where `...` is an OID. The former would risk pulling in other untested features we're no trying to test with, while the latter would not be easy to upgrade automatically as what we have now (we would be deliberately keeping a hash not at any tag that is already not the latest hash on any branch). In contrast, the `Quansight-Labs/setup-python` fork adds this feature while staying up to date with others. When `actions/setup-python` has a release (stable or prerelease) with this feature, we can switch to it. This could probably be done with less code duplication by using a matrix variable for the action to use. Instead, the "Set up Python" step is split in two, with opposite `if` conditions, so that each is capable of being recognized and upgraded by Dependabot if a new major version is released (in case this ends up remaining in place longer than expected).
  • Loading branch information
@EliahKagan@Byron
EliahKagan authored and Byron committed Mar 12, 2025
commit c13d998c03ec5268b5b6c361fe0c65854041b684
11 changes: 10 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os-type: [ubuntu, macos, windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
exclude:
- os-type: macos
python-version: "3.7" # Not available for the ARM-based macOS runners.
Expand All@@ -40,11 +40,20 @@ jobs:
fetch-depth: 0

- name: Set up Python ${{matrix.python-version }}
if: |-
!endsWith(matrix.python-version, 't')
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version }}
allow-prereleases: ${{matrix.experimental }}

- name: Set up Python ${{matrix.python-version }} (free-threaded)
if: endsWith(matrix.python-version, 't')
uses: Quansight-Labs/setup-python@v5
with:
python-version: ${{matrix.python-version }}
allow-prereleases: ${{matrix.experimental }}

- name: Set up WSL (Windows)
if: matrix.os-type == 'windows'
uses: Vampire/[email protected]
Expand Down