1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-19 01:00:26 +02:00

Add freethreaded input and fix handling of prerelease versions

This commit is contained in:
Sam Gross 2025-01-30 19:46:04 +00:00
parent d653c0b66e
commit 72902a03bd
7 changed files with 163 additions and 55 deletions

View file

@ -77,7 +77,7 @@ steps:
- run: python my_script.py
```
Use the **t** suffix to select the [free threading](https://docs.python.org/3/howto/free-threading-python.html) version of Python.
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`.
Free threaded Python is only available starting with the 3.13 release.
```yaml
@ -89,7 +89,17 @@ steps:
- run: python my_script.py
```
Pre-release free threading versions should be specified like `3.14.0ta3` or `3.14t-dev`.
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.
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '>=3.13'
freethreaded: true
- run: python my_script.py
```
You can also use several types of ranges that are specified in [semver](https://github.com/npm/node-semver#ranges), for instance: