From 28106a581fafcfd7c61ff5eacb0053ef69718d9d Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Tue, 9 Feb 2021 11:47:28 +0000 Subject: [PATCH] Fix Python Old-Deps CI step (#79) * Fix the Python 3.5 old-deps build. (#9146) setuptools 51.0.0 dropped support for Python 3.5. * Fix Python 3.5 old deps build by using a compatible pip version. (#9217) Co-authored-by: Dan Callahan pip 21.0 stopped supporting Python 3.5. Co-authored-by: Patrick Cloke --- .buildkite/scripts/test_old_deps.sh | 3 +++ changelog.d/9146.misc | 1 + changelog.d/9217.misc | 1 + tox.ini | 12 +++++++----- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 changelog.d/9146.misc create mode 100644 changelog.d/9217.misc diff --git a/.buildkite/scripts/test_old_deps.sh b/.buildkite/scripts/test_old_deps.sh index 9905c4bc4f..28e6694b5d 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/changelog.d/9146.misc b/changelog.d/9146.misc new file mode 100644 index 0000000000..7af29baa30 --- /dev/null +++ b/changelog.d/9146.misc @@ -0,0 +1 @@ +Fix the Python 3.5 + old dependencies build in CI. diff --git a/changelog.d/9217.misc b/changelog.d/9217.misc new file mode 100644 index 0000000000..72bacc7110 --- /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 69d23d5613..db751b5b4c 100644 --- a/tox.ini +++ b/tox.ini @@ -17,11 +17,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' setenv = PYTHONDONTWRITEBYTECODE = no_byte_code @@ -77,10 +79,8 @@ skip_install=True deps = # Old automat version for Twisted Automat == 0.3.0 - lxml - coverage - coverage-enable-subprocess + {[base]deps} commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete @@ -134,6 +134,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