Get ready for tox 4

Changes:
- eliminate whitespace in passenv values
- account for stricter allowlist checking
- removed skipsdist=True, which in tox 4 appears to prevent os-brick
  from being installed in the testenvs
- made 4.0.0 the tox minversion

This patch makes tox 4 the default so that we can hopefully catch
problems locally before they block the gate.

Change-Id: I9f88d024c9d7b4f2761aa4e132ee0bd5b7272207
This commit is contained in:
Brian Rosmaita 2022-12-21 08:11:58 -05:00
parent c3f14b467f
commit c9b82241ea
1 changed files with 19 additions and 9 deletions

28
tox.ini
View File

@ -1,11 +1,12 @@
[tox]
minversion = 3.18.0
skipsdist = True
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
envlist = py3,pep8
minversion = 4.0.0
# specify virtualenv here to keep local runs consistent with the
# gate (it sets the versions of pip, setuptools, and wheel)
requires = virtualenv>=20.17.1
# this allows tox to infer the base python from the environment name
# and override any basepython configured in this file
ignore_basepython_conflict=true
envlist = py3,pep8
[testenv]
basepython = python3
@ -32,7 +33,13 @@ commands =
allowlist_externals = bash
find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:debug]
commands =
@ -46,6 +53,8 @@ commands =
[testenv:fast8]
envdir = {toxworkdir}/pep8
allowlist_externals =
{toxinidir}/tools/fast8.sh
commands =
{toxinidir}/tools/fast8.sh
@ -84,13 +93,14 @@ commands =
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
allowlist_externals = rm
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
commands = {[testenv:docs]commands}
commands =
{[testenv:docs]commands}
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
allowlist_externals =
{[testenv:docs]allowlist_externals}
make
[testenv:releasenotes]
@ -135,8 +145,8 @@ import_exceptions = os_brick.i18n
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
# explicitly to avoid unnecessarily installing the checked-out repo too
skip_install = True
deps = bindep
commands = bindep {posargs}
usedevelop = False