[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] 636b6b3bde/upper-constraints.txt (L44)

Change-Id: I22f55d8ff314d9ca988a2b602f530cec2427a404
This commit is contained in:
Elod Illes 2023-07-17 17:40:38 +02:00
parent 35213c8813
commit 6cf6eda953

View File

@ -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}