1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-30 14:25:59 +02:00

Add free threading to advanced usage documentation

This commit is contained in:
Sam Gross 2025-01-22 19:38:22 +00:00
parent eb2a6532f9
commit c70f76ebc5
2 changed files with 24 additions and 0 deletions

View file

@ -45,6 +45,16 @@ steps:
- run: python my_script.py
```
**Free threaded Python**
```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13t'
- run: python my_script.py
```
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.
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/).