From 115b211ac97d7f81e2d5fe88504fc0522ae9f0cb Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Fri, 23 Dec 2022 14:35:31 +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 Removed the py27 zuul job target. Updated the base tox.ini so that the showconfig will pass for the pep8 target in the tox.ini in the subdir. Partial-Bug: #2000399 Signed-off-by: Al Bailey Change-Id: I4227eae6dc9e796f784984d31f575297ae0f2838 --- .zuul.yaml | 19 ------------------- .../k8sapp_openstack/tox.ini | 2 +- tox.ini | 6 +++++- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index beba25ad..060b06c7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,7 +3,6 @@ check: jobs: - openstack-tox-linters - - k8sapp-openstack-tox-py27 - k8sapp-openstack-tox-py36 - k8sapp-openstack-tox-py39 - k8sapp-openstack-tox-pylint @@ -11,7 +10,6 @@ gate: jobs: - openstack-tox-linters - - k8sapp-openstack-tox-py27 - k8sapp-openstack-tox-py36 - k8sapp-openstack-tox-py39 - k8sapp-openstack-tox-pylint @@ -19,23 +17,6 @@ jobs: - stx-openstack-armada-app-upload-git-mirror -- job: - name: k8sapp-openstack-tox-py27 - parent: tox-py27 - description: | - Run py27 test for k8app-openstack - nodeset: debian-bullseye - required-projects: - - starlingx/config - - starlingx/fault - - starlingx/update - - starlingx/utilities - files: - - python-k8sapp-openstack/k8sapp_openstack/* - vars: - tox_envlist: py27 - python_version: 2.7 - tox_extra_args: -c python-k8sapp-openstack/k8sapp_openstack/tox.ini - job: name: k8sapp-openstack-tox-py36 parent: tox-py36 diff --git a/python-k8sapp-openstack/k8sapp_openstack/tox.ini b/python-k8sapp-openstack/k8sapp_openstack/tox.ini index baa4ef6d..eda9cd0e 100644 --- a/python-k8sapp-openstack/k8sapp_openstack/tox.ini +++ b/python-k8sapp-openstack/k8sapp_openstack/tox.ini @@ -19,7 +19,7 @@ basepython = python3.9 sitepackages = False # 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 e7140039..06a2e7a8 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] @@ -32,6 +32,10 @@ commands = commands = {[testenv:bashate]commands} +[testenv:pep8] +basepython = python3 +description = Dummy environment to allow pep8 to be run in subdir tox + [testenv:pylint] basepython = python3 description = Dummy environment to allow pylint to run in subdir tox