Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 4ff908a

Browse files
colesburyandfoy
authored andcommitted
Add free threading to advanced usage documentation
1 parent 536ce35 commit 4ff908a

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ steps:
6565
- run: python my_script.py
6666
```
6767
68+
**Free threaded Python**
69+
```yaml
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: '3.13t'
75+
- run: python my_script.py
76+
```
77+
6878
The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python or PyPy version from the PATH will be used. The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always setting Python version explicitly using the `python-version` or `python-version-file` inputs.
6979

7080
The action will first check the local [tool cache](docs/advanced-usage.md#hosted-tool-cache) for a [semver](https://github.com/npm/node-semver#versions) match. If unable to find a specific version in the tool cache, the action will attempt to download a version of Python from [GitHub Releases](https://github.com/actions/python-versions/releases) and for PyPy from the official [PyPy's dist](https://downloads.python.org/pypy/).

docs/advanced-usage.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ steps:
7777
- run: python my_script.py
7878
```
7979
80+
Use the **t** suffix to select the [free threading](https://docs.python.org/3/howto/free-threading-python.html) version of Python.
81+
Free threaded Python is only available starting with the 3.13 release.
82+
83+
```yaml
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: actions/setup-python@v5
87+
with:
88+
python-version: '3.13t'
89+
- run: python my_script.py
90+
```
91+
92+
Pre-release free threading versions should be specified like `3.14.0ta3` or `3.14t-dev`.
93+
8094
You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance:
8195

8296
- **[ranges](https://github.com/npm/node-semver#ranges)** to download and set up the latest available version of Python satisfying a range:

0 commit comments

Comments
 (0)