From 6d05e8ef384e819c64fb8e2b2703eb4ff7be8bef Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Fri, 23 Dec 2022 16:08:57 +0000 Subject: [PATCH] Partially update tox.ini to work with tox 4 This change will allow this repo to pass zuul now that this has merged: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Tox 4 deprecated whitelist_externals. Replace whitelist_externals with allowlist_externals skipsdist acts differently in tox 4. Unable to get unit tests to pass with it removed. pinning zuul to use tox < 4 Partial-Bug: #2000399 Signed-off-by: Al Bailey Change-Id: I2efa39b371d89c4681c6d2f0cc9eb71ef6f0dbdb --- .zuul.yaml | 2 ++ python-k8sapp-auditd/k8sapp_auditd/.gitignore | 1 + python-k8sapp-auditd/k8sapp_auditd/tox.ini | 4 +--- tox.ini | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 2f105c1..3e587fa 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,5 +1,7 @@ --- - project: + vars: + ensure_tox_version: '<4' check: jobs: - openstack-tox-linters diff --git a/python-k8sapp-auditd/k8sapp_auditd/.gitignore b/python-k8sapp-auditd/k8sapp_auditd/.gitignore index 78c457c..303ec27 100644 --- a/python-k8sapp-auditd/k8sapp_auditd/.gitignore +++ b/python-k8sapp-auditd/k8sapp_auditd/.gitignore @@ -14,6 +14,7 @@ doc/source/api/ dist build eggs +.eggs parts var sdist diff --git a/python-k8sapp-auditd/k8sapp_auditd/tox.ini b/python-k8sapp-auditd/k8sapp_auditd/tox.ini index c59c71a..1960133 100644 --- a/python-k8sapp-auditd/k8sapp_auditd/tox.ini +++ b/python-k8sapp-auditd/k8sapp_auditd/tox.ini @@ -1,8 +1,6 @@ [tox] envlist = flake8,py27,py36,py39,pylint,bandit minversion = 1.6 -# skipsdist = True -#,pip-missing-reqs # tox does not work if the path to the workdir is too long, so move it to /tmp toxworkdir = /tmp/{env:USER}_k8saudittox @@ -19,7 +17,7 @@ sitepackages = False basepython = python3 # tox is silly... these need to be separated by a newline.... -whitelist_externals = bash +allowlist_externals = bash find install_command = pip install -v -v -v \ diff --git a/tox.ini b/tox.ini index 807555b..c6f275e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = linters minversion = 2.3 -skipsdist = True sitepackages=False +skipsdist=True [testenv] install_command = pip install -U {opts} {packages} @@ -15,7 +15,7 @@ setenv = deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = +allowlist_externals = bash [testenv:bashate]