From 91ae9572711e07f765c41e1fde672b08fad25232 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Fri, 20 Jan 2023 15:11:32 -0500 Subject: [PATCH] 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. Related-Bug: #2002788 Change-Id: Ib1904db255750aba221f95dd38422ecc9a209574 --- .zuul.yaml | 5 ++++- bindep.txt | 4 ++++ test-requirements.txt | 7 ++++--- tox.ini | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 bindep.txt diff --git a/.zuul.yaml b/.zuul.yaml index fd20909e..af38b105 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,7 @@ - project: templates: - - openstack-python3-charm-jobs - openstack-cover-jobs + check: + jobs: + - tox-py36 # bionic + - tox-py38 # focal diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..6ea34f66 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,4 @@ +libffi-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] +python3-psutil [platform:dpkg] diff --git a/test-requirements.txt b/test-requirements.txt index 60b06f24..e842c522 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -38,11 +38,12 @@ oslo.utils<=3.41.0;python_version<'3.6' coverage>=4.5.2 pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking) -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/ussuri#egg=zaza +git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/ussuri#egg=zaza.openstack # Needed for charm-glance: -git+https://opendev.org/openstack/tempest.git#egg=tempest;python_version>='3.6' +git+https://opendev.org/openstack/tempest.git#egg=tempest;python_version>='3.8' +tempest<31.0.0;python_version<'3.8' and python_version>='3.6' tempest<24.0.0;python_version<'3.6' croniter # needed for charm-rabbitmq-server unit tests diff --git a/tox.ini b/tox.ini index 81fd2492..26b61ba2 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -84,7 +85,7 @@ deps = -r{toxinidir}/requirements.txt [testenv:pep8] basepython = python3 deps = flake8==3.9.2 - charm-tools==2.8.3 + charm-tools<3.0.0 commands = flake8 {posargs} hooks unit_tests tests actions lib files charm-proof