From d4554e4ab57cca6e0f784beb7e058a5226c5946e Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Mon, 12 Feb 2024 14:59:39 +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: I770e55db5d6f53174c490749d27830f9209e98cc --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2823e0521..cd371c257 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,9 @@ [tox] -minversion = 3.18.0 +minversion = 4.4.0 envlist = py3,functional,pep8 [testenv] +constrain_package_deps = true usedevelop = True setenv = VIRTUAL_ENV={envdir} @@ -51,6 +52,7 @@ deps = flake8-import-order~=0.18.0 # LGPLv3 pycodestyle>=2.0.0,<3.0.0 # MIT doc8~=1.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 commands =