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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user