From 89e321b7b5c88ab7cfab53103295774ca535f0df Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 18 Jun 2021 11:32:47 +0100 Subject: [PATCH] tox: Encode specific Python versions Declare specific versions of Python for environments that don't specifically encode a version. We use the highest version officially supported, Python 3.8, for most environments except lower-constraints, which uses the lowest version, Python 3.6. This is necessary for users on Fedora, where the default Python version is Python 3.9. This will unfortunately introduce a small amount of busy work whenever we change supported Python versions, as tox will need to be updated, but that's a small price to pay for the usability wins that Fedora users will see. Change-Id: I240d5b8aa3eb1925b97af57e2644be61bfc106c2 Signed-off-by: Stephen Finucane Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/801773 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d11a1d69e05f..694ecce50659 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = py38,functional,pep8 ignore_basepython_conflict = True [testenv] -basepython = python3 +basepython = python3.8 usedevelop = True allowlist_externals = bash @@ -342,6 +342,7 @@ commands = bindep test [testenv:lower-constraints] +basepython = python3.6 usedevelop = False deps = -c{toxinidir}/lower-constraints.txt