1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 21:13:46 -05:00

Support free-threaded CPython flavor in prefix resolution (#3090)

Since 3.13, CPython is provided in 2 flavors: regular and
free-threaded, with the 't' suffix.

An incomplete prefix ending with '[0-9]t'
resolves only among versions that also end with '[0-9]t'
This commit is contained in:
native-api
2024-10-11 16:28:10 +03:00
committed by GitHub
parent 03b60aafec
commit 3ced1c4751
2 changed files with 27 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ echo 3.10.6
!
}
@test "ignores rolling releases, branch tips, alternative srcs, prereleases and virtualenvs" {
@test "ignores rolling releases, branch tips, alternative srcs, prereleases, virtualenvs; 't' versions if prefix without 't'" {
create_executable pyenv-versions <<!
#!$BASH
echo 3.8.5-dev
@@ -116,6 +116,21 @@ echo 3.8.1/envs/foo
!
}
@test "resolves to a 't' version if prefix has 't'" {
create_executable pyenv-versions <<!
#!$BASH
echo 3.13.2t
echo 3.13.5
echo 3.13.5t
echo 3.14.6
!
run pyenv-latest 3t
assert_success
assert_output <<!
3.13.5t
!
}
@test "falls back to argument with -b" {
create_executable pyenv-versions <<!
#!$BASH