mirror of
https://github.com/actions/setup-python.git
synced 2025-06-16 01:07:13 +02:00
Support free threaded Python versions like '3.13t' (#973)
* Support free threaded Python versions like '3.13t' Python wheels, pyenv, and a number of other tools use 't' in the Python version number to identify free threaded builds. For example, '3.13t', '3.14.0a1', '3.14t-dev'. This PR supports that syntax in `actions/setup-python`, strips the "t", and adds "-freethreading" to the architecture to select the correct Python version. See #771 * Add free threading to advanced usage documentation * Fix desugaring of `3.13.1t` and add test case. * Add freethreaded input and fix handling of prerelease versions * Fix lint * Add 't' suffix to python-version output * Use distinct cache key for free threaded Python * Remove support for syntax like '3.14.0a1' * Clarify use of 't' suffix * Improve error message when trying to use free threaded Python versions before 3.13
This commit is contained in:
@ -92,6 +92,7 @@ async function run() {
|
||||
const versions = resolveVersionInput();
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
const allowPreReleases = core.getBooleanInput('allow-prereleases');
|
||||
const freethreaded = core.getBooleanInput('freethreaded');
|
||||
|
||||
if (versions.length) {
|
||||
let pythonVersion = '';
|
||||
@ -132,7 +133,8 @@ async function run() {
|
||||
arch,
|
||||
updateEnvironment,
|
||||
checkLatest,
|
||||
allowPreReleases
|
||||
allowPreReleases,
|
||||
freethreaded
|
||||
);
|
||||
pythonVersion = installed.version;
|
||||
core.info(`Successfully set up ${installed.impl} (${pythonVersion})`);
|
||||
|
Reference in New Issue
Block a user