From 12a2b17bc77f9fbcac3bb04b8d53613a42669938 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Wed, 2 Feb 2022 14:59:51 -0800 Subject: [PATCH] Fix tox to ignore_basepython_conflict Tox includes a couple of enhancements: - [1] previously mishandled the basepython directive. - previously ignored PYTHONDONTWRITEBYTECODE [2] So we can remove the workarounds. See ML thread [3] for some details [1] https://github.com/tox-dev/tox/issues/477 [2] https://github.com/tox-dev/tox/commit/336f4f6bd8b53223f940fc5cfc43b1bbd78d4699 [3] http://lists.openstack.org/pipermail/openstack-dev/2018-July/thread.html#132075 Change-Id: Ibd8b77bb10c5a739fea11a02e959b66c5e81f221 Signed-off-by: Goutham Pacha Ravi --- tox.ini | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 12ff809e0..18597205c 100644 --- a/tox.ini +++ b/tox.ini @@ -3,19 +3,22 @@ distribute = False envlist = py3,pep8 minversion = 3.18.0 skipsdist = True +# Automatic envs (pyXX) will only use the python version appropriate to that +# env and ignore basepython inherited from [testenv] if we set +# ignore_basepython_conflict. +ignore_basepython_conflict = true [testenv] basepython = python3 +usedevelop = true setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 - -allowlist_externals = find + PYTHONDONTWRITEBYTECODE=1 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt commands = - find . -type f -name "*.pyc" -delete stestr run {posargs} stestr slowest