From 4e2a8fcba8169f4c4571900c8db514c90f00e914 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Mon, 26 Dec 2022 23:30:45 +0000 Subject: [PATCH] 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 Also fixed the zuul configuration. Partial-Bug: #2000399 Signed-off-by: Al Bailey Change-Id: Id7f7fb8e75a98df73bf4d14caeeecb9dc5ffb976 --- .zuul.yaml | 10 +--------- kube-cpusets/kube-cpusets/tox.ini | 8 ++++++-- kube-memory/kube-memory/tox.ini | 2 +- tox.ini | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index f1793a0..f0c1130 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -27,14 +27,6 @@ post: jobs: - stx-monitoring-upload-git-mirror - - kube-cpusets-tox-py27 - - kube-cpusets-tox-py39 - - kube-cpusets-tox-flake8 - - kube-cpusets-tox-pylint - - kube-memory-tox-py27 - - kube-memory-tox-py39 - - kube-memory-tox-flake8 - - kube-memory-tox-pylint - job: name: stx-monitoring-upload-git-mirror @@ -56,7 +48,7 @@ Run pylint test for kube-cpusets required-projects: - starlingx/config - nodeset: ubuntu-bionic + nodeset: debian-bullseye files: - kube-cpusets/* vars: diff --git a/kube-cpusets/kube-cpusets/tox.ini b/kube-cpusets/kube-cpusets/tox.ini index 878f38c..4cbb284 100644 --- a/kube-cpusets/kube-cpusets/tox.ini +++ b/kube-cpusets/kube-cpusets/tox.ini @@ -30,7 +30,7 @@ install_command = pip install \ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -e{[tox]stxdir}/config/tsconfig/tsconfig -whitelist_externals = find +allowlist_externals = find sh [testenv:stestr] commands = @@ -83,9 +83,13 @@ commands = flake8 {posargs} . [testenv:pylint] +basepython = python3.9 deps = {[testenv]deps} pylint -basepython = python3.6 +install_command = pip install \ + -v -v -v \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ + {opts} {packages} sitepackages = False commands = pylint kube_cpusets --rcfile=./pylint.rc diff --git a/kube-memory/kube-memory/tox.ini b/kube-memory/kube-memory/tox.ini index 5625a27..d808a51 100644 --- a/kube-memory/kube-memory/tox.ini +++ b/kube-memory/kube-memory/tox.ini @@ -31,7 +31,7 @@ install_command = pip install \ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -e{[tox]stxdir}/config/tsconfig/tsconfig -whitelist_externals = find +allowlist_externals = find sh [testenv:stestr] commands = diff --git a/tox.ini b/tox.ini index c08cd85..64b3337 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ setenv = deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = +allowlist_externals = bash [testenv:bashate]