Pin tox to < 4.0.0, mock to < 5.0.0

Tox 4.0.0 was recently released and it has several breaking changes.
We pin to < 4.0.0 here. We are planning to move forward only on the
master charm branches.

Tox is also pinned to < 4.0.0 for stable branches in upstream
openstack-zuul-jobs as well as in zosci-config. However, the
requires= section in the charm's tox.ini file ends up installing
tox>4, wiping out the zuul-pinned tox<4 that was already installed
installed. This patch fixes that.

Also pin mock to < 5.0.0 to avoid it erroring out on some broken tests,
fixes for those tests are available in master but we can't backport
those properly until tox is fixed in the stable branches.

Related-Bug: #2002788
Change-Id: I819204efb7907e158c6000ef66095b9dd03a8473
This commit is contained in:
Trent Lloyd 2023-02-13 16:39:28 +08:00
parent 0436af4311
commit ef88184d23
2 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,7 @@ requests>=2.18.4
# Newer mock seems to have some syntax which is newer than python3.5 (e.g.
# f'{something}'
mock>=1.2,<4.0.0; python_version < '3.6'
mock>=1.2; python_version >= '3.6'
mock>=1.2,<5.0.0; python_version >= '3.6'
stestr>=2.2.0

View File

@ -26,6 +26,7 @@ requires =
pip < 20.3
virtualenv < 20.0
setuptools < 50.0.0
tox < 4.0.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.18.0