From 5c781a916c23825249fa54729d4f715c9105160d Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Mon, 12 Feb 2024 14:54:38 +0100 Subject: [PATCH] Force constraints when installing a package during tox test The tox deps option grants installation of single dependencies and requirements, optionally pinned using constraints, before installing a package, therefore not granting installation of the correct constraint during the package installation. To fix that tox 4.4.0 has introduced the constrain_package_deps option [1] [1] https://tox.wiki/en/4.12.1/faq.html#using-constraint-files Change-Id: I94f02c99d1301e9dcdecb8b5565ef6a24204dc69 --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 747dfdb10c..e7eafed727 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,9 @@ [tox] -minversion = 3.18.0 +minversion = 4.4.0 envlist = py3,pep8 [testenv] +constrain_package_deps = true usedevelop = True setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE=1 @@ -47,6 +48,7 @@ deps= flake8-import-order~=0.18.0 # LGPLv3 Pygments~=2.17.0 # BSD bashate~=2.1.0 # Apache-2.0 + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} allowlist_externals = bash {toxinidir}/tools/run_bashate.sh {toxinidir}/tools/check-releasenotes.py