From 87d6eec5289e53097c6a0455900a0f93508f2d8d Mon Sep 17 00:00:00 2001 From: albailey Date: Tue, 8 Dec 2020 12:17:40 -0600 Subject: [PATCH] Fix tox failures from new version of virtualenv and pip New pip was released on Dec 3, 2020 which breaks downloads from pypi for some URLs (python 3). New virtualenv was released Dec 7 which includes that new pip. In order for sysinv in python3 on ubuntu-bionic to pass its tox and zuul jobs, the legacy resolver must be used. The requirements may need to be updated in future revisions. Closes-Bug: 1907125 Change-Id: Idecaee7d83f4cbf02454e172aa254b7d8d449141 Signed-off-by: albailey (cherry picked from commit 473e55b494b556bae9a41904ab9b85aa78d68e7f) --- sysinv/sysinv/sysinv/tox.ini | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sysinv/sysinv/sysinv/tox.ini b/sysinv/sysinv/sysinv/tox.ini index e4c91e168a..f1f3ce39d1 100644 --- a/sysinv/sysinv/sysinv/tox.ini +++ b/sysinv/sysinv/sysinv/tox.ini @@ -21,7 +21,7 @@ sitepackages = True whitelist_externals = bash find -install_command = pip install \ +install_command = pip install --use-deprecated legacy-resolver \ -v -v -v \ -c{toxinidir}/upper-constraints.txt \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ @@ -90,18 +90,19 @@ commands = # E127 continuation line over-indented for visual indent # E128 continuation line under-indented for visual indent # E402 module level import not at top of file +# E741 ambiguous variable name ignore = H101,H102,H104,H105,H306,H401,H403,H404,H405,H701,H702,H703, B006,B007,B009,B010,B012,B014,B301,B306, W503,W504,W605, - E117,E126,E127,E128,E402 + E117,E126,E127,E128,E402,E741 exclude = build,dist,tools,.eggs max-line-length=120 [testenv:flake8] basepython = python3 deps = -r{toxinidir}/test-requirements.txt - flake8-bugbear + commands = flake8 {posargs} . \ scripts/manage-partitions \ @@ -155,10 +156,11 @@ commands = {posargs} # B604: Test for any function with shell equals true # B605: Test for starting a process with a shell # B607: Test for starting a process with a partial path +# B608: Possible SQL injection vector through string-based query # # Note: 'skips' entry cannot be split across multiple lines # -skips = B101,B103,B104,B105,B108,B110,B303,B307,B310,B311,B314,B318,B320,B404,B405,B408,B410,B506,B602,B603,B604,B605,B607 +skips = B101,B103,B104,B105,B108,B110,B303,B307,B310,B311,B314,B318,B320,B404,B405,B408,B410,B506,B602,B603,B604,B605,B607,B608 exclude = tests [testenv:bandit] @@ -170,7 +172,6 @@ commands = bandit --ini tox.ini -n 5 -r sysinv [testenv:pylint] basepython = python2.7 sitepackages = False - deps = {[testenv]deps} pylint commands =