[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: I6ff80b7f57abd821b19c8ad18029bf37c4f22e38
This commit is contained in:
Elod Illes 2023-07-17 17:01:34 +02:00
parent 054a4abcf7
commit 7d3e351d8d
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,12 @@ skipsdist = True
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
ignore_basepython_conflict = 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]
basepython = python3