Fix issues related to py312 compatibility

Summary of changes:
- Remove pinnings for pip, virtualenv, setuptools
- Add py312 section to tox.ini [testenv]
- Removed test dependency on retired sunbeam-ops repo
- Updated zuul.yaml to use openstack-python3-charm-jobs

Change-Id: I289118ce34583e511c52847613a2bd2694d45ae3
This commit is contained in:
Myles Penner 2024-08-22 21:06:26 +00:00
parent eb39635b4d
commit 2a6dde27df
3 changed files with 7 additions and 18 deletions

@ -1,5 +1,5 @@
- project:
templates:
- openstack-python3-charm-yoga-jobs
- openstack-python3-charm-jobs
- openstack-cover-jobs

@ -5,6 +5,5 @@ git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
requests-mock
ripdb
git+https://github.com/openstack/charm-ops-sunbeam.git
mock
git+https://opendev.org/openstack/charm-ops-openstack@master#egg=ops_openstack

22
tox.ini

@ -7,21 +7,6 @@ skipsdist = True
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
# NOTES:
# * We avoid the new dependency resolver by pinning pip < 20.3, see
# https://github.com/pypa/pip/issues/9187
# * Pinning dependencies requires tox >= 3.2.0, see
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
# * It is also necessary to pin virtualenv as a newer virtualenv would still
# lead to fetching the latest pip in the func* tox targets, see
# https://stackoverflow.com/a/38133283
# * It is necessary to declare setuptools as a dependency otherwise tox will
# fail very early at not being able to load it. The version pinning is in
# line with `pip.sh`.
requires = pip < 20.3
virtualenv < 20.0
setuptools < 50.0.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.2.0
[testenv]
@ -36,7 +21,7 @@ allowlist_externals =
bash
charmcraft
rename.sh
passenv = HOME TERM CS_* OS_* TEST_*
passenv = HOME, TERM, CS_*, OS_*, TEST_*
deps = -r{toxinidir}/test-requirements.txt
[testenv:py38]
@ -54,6 +39,11 @@ basepython = python3.10
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py312]
basepython = python3.12
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py3]
basepython = python3
deps = -r{toxinidir}/requirements.txt