From 8bff74dbd4c678ff621a31c95125476b6579dd39 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 8 May 2021 01:55:30 +0300 Subject: [PATCH 1/2] Drop inferring version to install from `pyenv local` This behavior is only triggered when the version is provided as an empty string, is undocumented and breaks if multiple local versions are specified (rightly so since it's unclear which of them to install). --- plugins/python-build/bin/pyenv-install | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/python-build/bin/pyenv-install b/plugins/python-build/bin/pyenv-install index ce6966ef..ece78b3a 100755 --- a/plugins/python-build/bin/pyenv-install +++ b/plugins/python-build/bin/pyenv-install @@ -115,12 +115,7 @@ done unset VERSION_NAME -# The first argument contains the definition to install. If the -# argument is missing, try to install whatever local app-specific -# version is specified by pyenv. Show usage instructions if a local -# version is not specified. DEFINITION="${ARGUMENTS[0]}" -[ -n "$DEFINITION" ] || DEFINITION="$(pyenv-local 2>/dev/null || true)" [ -n "$DEFINITION" ] || usage 1 >&2 # Define `before_install` and `after_install` functions that allow From b4511f078766de4c014a469d9ba9a48b26a0948f Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Mon, 10 May 2021 03:19:38 +0300 Subject: [PATCH 2/2] Remove test for the feature --- plugins/python-build/test/pyenv.bats | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugins/python-build/test/pyenv.bats b/plugins/python-build/test/pyenv.bats index 8ed63207..76c822a4 100644 --- a/plugins/python-build/test/pyenv.bats +++ b/plugins/python-build/test/pyenv.bats @@ -23,17 +23,6 @@ stub_python_build() { unstub pyenv-rehash } -@test "install pyenv local version by default" { - stub_python_build 'echo python-build "$1"' - stub pyenv-local 'echo 3.4.2' - - run pyenv-install - assert_success "python-build 3.4.2" - - unstub python-build - unstub pyenv-local -} - @test "list available versions" { stub_python_build \ "--definitions : echo 2.6.9 2.7.9-rc1 2.7.9-rc2 3.4.2 | tr ' ' $'\\n'"