From bd08bf4f85e7b6168ec0fd8d07bc72904488aaca Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Mon, 12 Feb 2024 14:57:43 +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: Ied659411bffb3f37e67523bc50a6a03b19cceef6 --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index e4f77ede7..aa3e39eb1 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 deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} @@ -56,6 +57,7 @@ deps = hacking~=6.1.0 # Apache-2.0 pycodestyle>=2.0.0,<3.0.0 # MIT doc8>=0.8.1 # Apache-2.0 + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} commands = flake8 ironic_inspector doc8 -e .rst -e .inc README.rst CONTRIBUTING.rst doc/source api-ref/source @@ -134,4 +136,4 @@ deps = codespell # note(JayF): {posargs} lets us run `tox -ecodespell -- -w` to get codespell # to correct spelling issues in our code it's aware of. commands = - codespell {posargs} \ No newline at end of file + codespell {posargs}