You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: action.yml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,9 @@ inputs:
26
26
allow-prereleases:
27
27
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
28
28
default: false
29
+
freethreaded:
30
+
description: "When 'true', use the freethreaded version of Python."
31
+
default: false
29
32
outputs:
30
33
python-version:
31
34
description: "The installed Python or PyPy version. Useful when given a version range as input."
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ steps:
77
77
- run: python my_script.py
78
78
```
79
79
80
-
Use the **t** suffix to select the [free threading](https://docs.python.org/3/howto/free-threading-python.html) version of Python.
80
+
You can specify the [free threading](https://docs.python.org/3/howto/free-threading-python.html) version of Python by setting the `freethreaded` input to `true` or by using the special **t** suffix in some cases. Pre-release free threading versions can be specified like `3.14.0a3t` or `3.14t-dev`.
81
81
Free threaded Python is only available starting with the 3.13 release.
82
82
83
83
```yaml
@@ -89,7 +89,17 @@ steps:
89
89
- run: python my_script.py
90
90
```
91
91
92
-
Pre-release free threading versions should be specified like `3.14.0ta3` or `3.14t-dev`.
92
+
Note that the **t** suffix is not `semver` syntax. If you wish to specify a range, you must use the `freethreaded` input instead of the `t` suffix.
93
+
94
+
```yaml
95
+
steps:
96
+
- uses: actions/checkout@v4
97
+
- uses: actions/setup-python@v5
98
+
with:
99
+
python-version: '>=3.13'
100
+
freethreaded: true
101
+
- run: python my_script.py
102
+
```
93
103
94
104
You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance:
0 commit comments