From 9f0c5426cc54775ec4f9d2f0ff89b709ae95b5fc Mon Sep 17 00:00:00 2001 From: albailey Date: Tue, 8 Dec 2020 16:07:51 -0600 Subject: [PATCH] Fix tox failures from new resolver in pip New pip was released on Dec 3, 2020 which breaks downloads from pypi for some URLs. New virtualenv was released Dec 7 which includes the new pip. The new pip uses a different resolver which fails with many of the components installed by pip. These components may need to be fixed by later commits, since the legacy resolver is being removed completely in early 2021. Change-Id: Ifcbd8965e2ef0b53dae0c878c2a0f2bd91b572c2 Closes-Bug: 1907125 Signed-off-by: albailey --- distributedcloud/tox.ini | 6 +++++- test-requirements.txt | 1 - tox.ini | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/distributedcloud/tox.ini b/distributedcloud/tox.ini index c709d491d..7bd5c7eaa 100644 --- a/distributedcloud/tox.ini +++ b/distributedcloud/tox.ini @@ -18,7 +18,7 @@ cgtsclient_src_dir = ../../config/sysinv/cgts-client/cgts-client cgcs_patch_src_dir = ../../update/cgcs-patch/cgcs-patch [testenv] -install_command = pip install \ +install_command = pip install --use-deprecated legacy-resolver -v -v -v \ -c ./upper-constraints.txt \ -c https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \ {opts} {packages} @@ -40,6 +40,10 @@ whitelist_externals = [testenv:py27] basepython = python2.7 +install_command = pip install -v -v -v \ + -c ./upper-constraints.txt \ + -c https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \ + {opts} {packages} deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt keyring diff --git a/test-requirements.txt b/test-requirements.txt index f4f6d3bb7..184eec960 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,3 @@ PyYAML>=3.1.0 yamllint>=0.5.2 mock>=2.0 # BSD -bandit!=1.6.0,>=1.1.0,<2.0.0 diff --git a/tox.ini b/tox.ini index c62ce223a..f4aa24ce3 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ minversion = 2.3 skipsdist = True [testenv] -install_command = pip install \ +install_command = pip install --use-deprecated legacy-resolver -v -v -v \ -c https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt \ {opts} {packages} setenv = @@ -87,4 +87,5 @@ whitelist_externals = rm basepython = python3 description = Bandit code scan for *.py files under config folder deps = -r{toxinidir}/test-requirements.txt + bandit commands = bandit -r {toxinidir}/ -x '**/.tox/**,**/.eggs/**' -lll