From 0e93678939553a804f86f657a2c35d8ea5db750a Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Tue, 28 Jul 2020 21:02:13 +0100 Subject: [PATCH] Output the installed version of pip in the build log (#1007) Since: * "explicit is better than implicit" * we'll soon be upgrading pip, and debugging breakage caused by upgrades will be easier if versions are visible in the build log Closes #939. --- CHANGELOG.md | 1 + bin/steps/python | 2 +- test/run-features | 1 + test/run-versions | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4c26777..07abf0ba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ # Master +- Output the installed version of pip in the build log (#1007). - Reduce the number of environment variables exposed to `bin/{pre,post}_compile` and other subprocesses (#1011) # 173 (2020-07-21) diff --git a/bin/steps/python b/bin/steps/python index 068e147cc..23a1850b9 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -150,7 +150,7 @@ fi # If a new Python has been installed or Pip isn't up to date: if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then - puts-step "Installing pip" + puts-step "Installing pip ${PIP_UPDATE}" # Remove old installations. rm -fr /app/.heroku/python/lib/python*/site-packages/pip-* diff --git a/test/run-features b/test/run-features index c50a8c33d..170a8a937 100755 --- a/test/run-features +++ b/test/run-features @@ -44,6 +44,7 @@ testStandardRequirements() { testPipenv() { compile "pipenv" + assertCaptured "Installing pip 9.0.2" assertCapturedSuccess } diff --git a/test/run-versions b/test/run-versions index 75f165b94..6fe7c1316 100755 --- a/test/run-versions +++ b/test/run-versions @@ -9,6 +9,7 @@ testPythonDefault() { compile "pythonDefault" assertCaptured $DEFAULT_PYTHON_VERSION assertNotCaptured "security update" + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -24,6 +25,7 @@ testPython2() { assertNotCaptured "python-2-7-eol-faq"; fi assertNotCaptured "security update" + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -51,6 +53,7 @@ testPython3_4() { compile "python3_4" assertCaptured $LATEST_34 assertNotCaptured "security update" + assertCaptured "Installing pip 19.1.1" # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then assertCapturedError @@ -86,6 +89,7 @@ testPython3_5() { compile "python3_5" assertCaptured $LATEST_35 assertNotCaptured "security update" + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -108,6 +112,7 @@ testPython3_6() { compile "python3_6" assertCaptured $LATEST_36 assertNotCaptured "security update" + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess } @@ -134,6 +139,7 @@ testPython3_7() { else assertNotCaptured "security update" assertCaptured $LATEST_37 + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess fi @@ -177,6 +183,7 @@ testPython3_8() { else assertNotCaptured "security update" assertCaptured $LATEST_38 + assertCaptured "Installing pip 20.0.2" assertCaptured "Installing SQLite3" assertCapturedSuccess fi @@ -195,6 +202,7 @@ testPypy3_6() { else assertCaptured "Installing pypy" assertCaptured "$PYPY_36" + assertCaptured "Installing pip 20.0.2" assertCapturedSuccess fi } @@ -206,6 +214,7 @@ testPypy2_7() { else assertCaptured "Installing pypy" assertCaptured "$PYPY_27" + assertCaptured "Installing pip 20.0.2" assertCapturedSuccess fi }