From 586a19db09509f341eed96e3dedbb79e29f085be Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 24 May 2021 10:29:01 -0700 Subject: [PATCH] pin pip normally --- certbot/setup.py | 1 + tools/pinning/pin.sh | 8 -------- tools/requirements.txt | 4 +--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/certbot/setup.py b/certbot/setup.py index 5ae02891b..c6b04bdf0 100644 --- a/certbot/setup.py +++ b/certbot/setup.py @@ -73,6 +73,7 @@ dev_extras = [ 'ipdb', 'mypy', 'PyGithub', + 'pip', # poetry 1.2.0+ is required for it to pin pip, setuptools, and wheel. See # https://github.com/python-poetry/poetry/issues/1584. 'poetry>=1.2.0a1', diff --git a/tools/pinning/pin.sh b/tools/pinning/pin.sh index 91d20dc7c..694889dd0 100755 --- a/tools/pinning/pin.sh +++ b/tools/pinning/pin.sh @@ -6,7 +6,6 @@ set -euo pipefail WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" REPO_ROOT="$(dirname "$(dirname "${WORK_DIR}")")" -PIPSTRAP_CONSTRAINTS="${REPO_ROOT}/tools/pipstrap_constraints.txt" RELATIVE_SCRIPT_PATH="$(realpath --relative-to "$REPO_ROOT" "$WORK_DIR")/$(basename "${BASH_SOURCE[0]}")" REQUIREMENTS_FILE="$REPO_ROOT/tools/requirements.txt" STRIP_HASHES="${REPO_ROOT}/tools/strip_hashes.py" @@ -37,13 +36,6 @@ trap 'rm poetry.lock; rm $TEMP_REQUIREMENTS' EXIT poetry export -o "${TEMP_REQUIREMENTS}" --without-hashes # We need to remove local packages from the requirements file. sed -i '/^acme @/d; /certbot/d;' "${TEMP_REQUIREMENTS}" -# Poetry currently will not include pip, setuptools, or wheel in lockfiles or -# requirements files. This was resolved by -# https://github.com/python-poetry/poetry/pull/2826, but as of writing this it -# hasn't been included in a release yet. For now, we continue to keep -# pipstrap's pinning separate which has the added benefit of having it continue -# to check hashes when pipstrap is run directly. -"${STRIP_HASHES}" "${PIPSTRAP_CONSTRAINTS}" >> "${TEMP_REQUIREMENTS}" cat << EOF > "$REQUIREMENTS_FILE" # This file was generated by $RELATIVE_SCRIPT_PATH and can be updated using diff --git a/tools/requirements.txt b/tools/requirements.txt index 4779fe4db..50d04c4d2 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -101,6 +101,7 @@ parso==0.8.2; python_version == "3.6" pathlib2==2.3.5; python_version >= "3.6" pexpect==4.8.0; python_version >= "3.6" and python_version < "4.0" or python_version == "3.6" and sys_platform != "win32" or python_version >= "3.7" and sys_platform != "win32" pickleshare==0.7.5; python_version == "3.6" or python_version >= "3.7" +pip==21.1.2; python_version >= "3.6" pkginfo==1.7.0; python_version >= "3.6" and python_version < "4.0" or python_version >= "3.6" pluggy==0.13.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version >= "3.5.0" ply==3.11; python_version >= "3.6" @@ -185,6 +186,3 @@ zope.component==5.0.0; python_version >= "3.6" and python_full_version < "3.0.0" zope.event==4.5.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" zope.hookable==5.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" zope.interface==5.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" -pip==20.2.4 -setuptools==54.1.2 -wheel==0.35.1