mirror of
https://github.com/apisnetworks/pyenv.git
synced 2026-11-30 19:59:01 +00:00
pyenv-latest: exclude free-threaded prereleases from prefix resolution (#3617)
--------- Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
1 parent
a2d0ea8903
commit
1f74f959e0
2 files changed
+21
-5
No files matched your search
@@ -77,7 +77,7 @@ IFS=$'\n'
|
||||
|
||||
DEFINITION_CANDIDATES=(\
|
||||
$(printf '%s\n' "${DEFINITION_CANDIDATES[@]:-}" | \
|
||||
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+$/d' \
|
||||
sed -E -e '/-dev$/d' -e '/-src$/d' -e '/-latest$/d' -e '/(a|b|rc)[0-9]+t?$/d' \
|
||||
$(if [[ -z $suffix ]]; then echo "-e /[0-9]t\$/d"; fi)
|
||||
));
|
||||
|
||||
|
||||
+20
-4
@@ -108,20 +108,27 @@ pypy2.7-8.0.1
|
||||
!
|
||||
}
|
||||
|
||||
@test "ignores rolling releases, branch tips, alternative srcs, prereleases, virtualenvs; 't' versions if prefix without 't'" {
|
||||
create_prereleases_stub() {
|
||||
create_stub pyenv-versions <<!
|
||||
[[ " \$* " == *" --skip-envs "* ]] || {
|
||||
echo "unexpected command line: \$@" >&2;
|
||||
exit 1
|
||||
}
|
||||
echo 3.8.5-dev
|
||||
echo 3.8.5-src
|
||||
echo 3.8.5-latest
|
||||
echo 3.8.5a2
|
||||
echo 3.8.5b3
|
||||
echo 3.8.5rc2
|
||||
echo 3.8.5t
|
||||
echo 3.8.5b3t
|
||||
echo 3.8.1t
|
||||
echo 3.8.6b3t
|
||||
echo 3.8.5rc2t
|
||||
echo 3.8.1
|
||||
echo 3.8.1/envs/foo
|
||||
!
|
||||
}
|
||||
|
||||
@test "ignores rolling releases, branch tips, alternative srcs, prereleases, virtualenvs, including 't' ones (prefix without 't')" {
|
||||
create_prereleases_stub
|
||||
run pyenv-latest 3.8
|
||||
assert_success
|
||||
assert_output <<!
|
||||
@@ -129,6 +136,15 @@ echo 3.8.1/envs/foo
|
||||
!
|
||||
}
|
||||
|
||||
@test "ignores rolling releases, branch tips, alternative srcs, prereleases, virtualenvs, including 't' ones (prefix with 't')" {
|
||||
create_prereleases_stub
|
||||
run pyenv-latest 3.8t
|
||||
assert_success
|
||||
assert_output <<!
|
||||
3.8.1t
|
||||
!
|
||||
}
|
||||
|
||||
@test "resolves to a 't' version if prefix has 't'" {
|
||||
create_stub pyenv-versions <<!
|
||||
echo 3.13.2t
|
||||
|
||||
Reference in new issue
Block a user