From 384361167a372068e3bb2f0f5627519ec8f90774 Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Mon, 1 Jul 2024 15:50:03 -0400 Subject: [PATCH] Add 3.13.0b3t and exclude it from `pyenv latest` (#3001) This adds the free-threaded (without GIL) version of 3.13.0b3. Co-authored-by: Ivan Pozdeev --- libexec/pyenv-latest | 2 +- plugins/python-build/share/python-build/3.13.0b3t | 2 ++ pyenv.d/install/latest.bash | 2 +- test/latest.bats | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 plugins/python-build/share/python-build/3.13.0b3t diff --git a/libexec/pyenv-latest b/libexec/pyenv-latest index d5e95e95..6f2d9e97 100755 --- a/libexec/pyenv-latest +++ b/libexec/pyenv-latest @@ -50,7 +50,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]+$/d' -e '/[0-9]+t$/d')); # Compose a sorting key, followed by | and original value DEFINITION_CANDIDATES=(\ diff --git a/plugins/python-build/share/python-build/3.13.0b3t b/plugins/python-build/share/python-build/3.13.0b3t new file mode 100644 index 00000000..31f54da0 --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.0b3t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "$(dirname "${BASH_SOURCE[0]}")"/3.13.0b3 diff --git a/pyenv.d/install/latest.bash b/pyenv.d/install/latest.bash index 790b2dd1..c99162b3 100644 --- a/pyenv.d/install/latest.bash +++ b/pyenv.d/install/latest.bash @@ -10,7 +10,7 @@ pyenv_install_resolve_latest() { $(python-build --definitions | \ grep -F "${DEFINITION_PREFIX}" | \ grep "^${DEFINITION_TYPE}" | \ - sed -E -e '/-dev$/d' -e '/-src$/d' -e '/(b|rc)[0-9]+$/d' | \ + sed -E -e '/-dev$/d' -e '/-src$/d' -e '/(b|rc)[0-9]+$/d' -e '/[0-9]+t$/d' | \ sort -t. -k1,1r -k 2,2nr -k 3,3nr \ || true)) DEFINITION="${DEFINITION_CANDIDATES}" diff --git a/test/latest.bats b/test/latest.bats index c145eff7..d382a926 100644 --- a/test/latest.bats +++ b/test/latest.bats @@ -103,6 +103,9 @@ 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.5rc2t echo 3.8.1 echo 3.8.1/envs/foo !