Pin tox to < 4.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.

Additional changes included in this patch:
- Add bindep.txt to install standard binary dependencies.
- Switch charm-tools to 2.8.4 to remove ruamel requirement that
  doesn't work on Python 3.10 (required for pep8/cover).
- Pin zaza and zaza-openstack-tests to stable/yoga branch as
  stable/21.10 is no longer supported.
- Pin urllib3 in test-requirements.txt for py35 unit tests

Related-Bug: #2002788
Change-Id: Ib60536bae9fa69ec9966407dd352e521528cb6f1
This commit is contained in:
Corey Bryant 2023-01-20 14:58:31 -05:00
parent 456401e8ae
commit c7a5b9648d
5 changed files with 12 additions and 4 deletions

4
bindep.txt Normal file
View File

@ -0,0 +1,4 @@
libffi-dev [platform:dpkg]
libpq-dev [platform:dpkg]
libxml2-dev [platform:dpkg]
libxslt1-dev [platform:dpkg]

View File

@ -10,7 +10,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb
# Build requirements
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
charm-tools==2.8.3
charm-tools==2.8.4
simplejson

View File

@ -8,5 +8,5 @@
tox
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
git+https://github.com/openstack-charmers/zaza.git@stable/21.10#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/21.10#egg=zaza.openstack
git+https://github.com/openstack-charmers/zaza.git@stable/yoga#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/yoga#egg=zaza.openstack

View File

@ -50,3 +50,6 @@ pbr==5.6.0 # vault
cryptography<3.4 # vault, keystone-saml-mellon
lxml # keystone-saml-mellon
hvac # vault, barbican-vault
# Pin urllib3 for py35 unit tests
urllib3<=1.26.7;python_version<'3.6'

View File

@ -23,6 +23,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
@ -96,7 +97,7 @@ commands = stestr run --slowest {posargs}
[testenv:pep8]
basepython = python3
deps = flake8==3.9.2
charm-tools==2.8.3
charm-tools==2.8.4
commands = flake8 {posargs} src unit_tests
[testenv:func-target]