From 1bcf0a53fea3903c10250b7a5f977293d93ae451 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 25 Jan 2021 09:15:59 -0500 Subject: [PATCH 1/4] Use an older version of pip. --- changelog.d/9217.misc | 1 + tox.ini | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/9217.misc diff --git a/changelog.d/9217.misc b/changelog.d/9217.misc new file mode 100644 index 000000000000..72bacc711000 --- /dev/null +++ b/changelog.d/9217.misc @@ -0,0 +1 @@ +Fix the Python 3.5 old dependencies build. diff --git a/tox.ini b/tox.ini index 95841e03f0e2..1e665cb3a3be 100644 --- a/tox.ini +++ b/tox.ini @@ -104,7 +104,8 @@ usedevelop=true [testenv:py35-old] skip_install=True deps = - # Ensure a version of setuptools that supports Python 3.5 is installed. + # Ensure versions of pip and setuptools that support Python 3.5 are installed. + pip < 21.0 setuptools < 51.0.0 # Old automat version for Twisted From a4f1f1607a337e09b98ec99eca4dfac719dde9ed Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Mon, 25 Jan 2021 16:00:35 +0000 Subject: [PATCH 2/4] Fix pip error on py35-old in CI Signed-off-by: Dan Callahan --- .buildkite/scripts/test_old_deps.sh | 3 +++ tox.ini | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.buildkite/scripts/test_old_deps.sh b/.buildkite/scripts/test_old_deps.sh index 9905c4bc4f3c..28e6694b5d36 100755 --- a/.buildkite/scripts/test_old_deps.sh +++ b/.buildkite/scripts/test_old_deps.sh @@ -10,4 +10,7 @@ apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev x export LANG="C.UTF-8" +# Prevent virtualenv from auto-updating pip to an incompatible version +export VIRTUALENV_NO_DOWNLOAD=1 + exec tox -e py35-old,combine diff --git a/tox.ini b/tox.ini index 1e665cb3a3be..6283d0eb2e5f 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = packaging, py35, py36, py37, py38, py39, check_codestyle, check_isort [base] +download = False deps = python-subunit junitxml @@ -18,11 +19,13 @@ deps = # installed on that). # # anyway, make sure that we have a recent enough setuptools. - setuptools>=18.5 + setuptools>=18.5 ; python_version >= '3.6' + setuptools>=18.5,<51.0.0 ; python_version < '3.6' # we also need a semi-recent version of pip, because old ones fail to # install the "enum34" dependency of cryptography. - pip>=10 + pip>=10 ; python_version >= '3.6' + pip>=10,<21.0 ; python_version < '3.6' # directories/files we run the linters on. # if you update this list, make sure to do the same in scripts-dev/lint.sh @@ -104,16 +107,10 @@ usedevelop=true [testenv:py35-old] skip_install=True deps = - # Ensure versions of pip and setuptools that support Python 3.5 are installed. - pip < 21.0 - setuptools < 51.0.0 - # Old automat version for Twisted Automat == 0.3.0 - lxml - coverage - coverage-enable-subprocess==1.0 + {[base]deps} commands = # Make all greater-thans equals so we test the oldest version of our direct From 390bb85740290fa97fa303873818c257c19e31cd Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Mon, 25 Jan 2021 16:27:58 +0000 Subject: [PATCH 3/4] Ensure `combine` has a modern enough pip version Signed-off-by: Dan Callahan --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 6283d0eb2e5f..2066fa1e70e2 100644 --- a/tox.ini +++ b/tox.ini @@ -167,6 +167,8 @@ commands = {toxinidir}/scripts-dev/generate_sample_config --check skip_install = True deps = coverage + pip>=10 ; python_version >= '3.6' + pip>=10,<21.0 ; python_version < '3.6' commands= coverage combine coverage report From 5007a13d62b7e91f66a570038e3e173a64381d07 Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Mon, 25 Jan 2021 18:53:48 +0000 Subject: [PATCH 4/4] Remove unused line Signed-off-by: Dan Callahan --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2066fa1e70e2..9ff70fe312c9 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,6 @@ envlist = packaging, py35, py36, py37, py38, py39, check_codestyle, check_isort [base] -download = False deps = python-subunit junitxml