From 6cf6eda953ebb95dc3bfad6ae68cc4dbfd9ea188 Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Mon, 17 Jul 2023 17:40:38 +0200 Subject: [PATCH] [stable-only] Cap virtualenv/setuptools With latest virtualenv release (20.24.0) and its bundled setuptools version, stable/victoria gates started to fail [1], because setuptools is not compatible with the pbr version (5.5.0) which is in victoria branch's upper constraint [2]. pbr's next release (5.5.1) removed the failing code, this is why the change is only needed in stable/victoria. This patch caps virtualenv to <20.24.0 to fix stable/victoria's gate, and also caps tox for the 'inner' virtualenv, otherwise tox>4 would be installed, that would introduce failures (those failures are fixed in newer stable branches, but it would need several backports and 'outer' tox is capped <4 anyway, so no worth dealing with it here). [1] AttributeError: module 'setuptools.command.easy_install' has no attribute 'get_script_header' [2] https://opendev.org/openstack/requirements/src/commit/636b6b3bde4b68ef27ac6b524cb888152eddf517/upper-constraints.txt#L44 Change-Id: I22f55d8ff314d9ca988a2b602f530cec2427a404 --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 8a06696ae..fbe3440a4 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,12 @@ envlist = py36,py38,pep8 minversion = 3.1.1 skipsdist = True +# Cap setuptools via virtualenv to prevent compatibility issue with victoria +# branch's upper constraint of pbr package (5.5.0). Tox is also needed to be +# constrained for the 'inner' tox to be installed with the constrained venv. +requires = + virtualenv<20.24.0 + tox<4 [testenv] setenv = VIRTUAL_ENV={envdir}