From ca18e71f5a2a0cf4d9dc6965865753b398d822df Mon Sep 17 00:00:00 2001 From: Jadon Naas Date: Tue, 20 Aug 2024 18:44:09 +0000 Subject: [PATCH] Updates for py312 compatibility - Removed pins to old version of setuptools - Added py312 section to tox.ini [testenv] - Updated flake8 to 7.1.1 instead of 3.9.2 Change-Id: Ib73053351a8a3daddfd989251999e1e5873357de --- requirements.txt | 1 - test-requirements.txt | 1 - tox.ini | 9 ++++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index b3dc23f..c5b8af3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,6 @@ # NOTE(lourot): This might look like a duplication of test-requirements.txt but # some tox targets use only test-requirements.txt whereas charm-build uses only # requirements.txt -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # NOTE: newer versions of cryptography require a Rust compiler to build, # see diff --git a/test-requirements.txt b/test-requirements.txt index a7936e6..3fd5feb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,6 @@ # https://github.com/openstack-charmers/release-tools # pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. -setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 diff --git a/tox.ini b/tox.ini index 30c5840..3e2072b 100644 --- a/tox.ini +++ b/tox.ini @@ -71,9 +71,16 @@ deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} +[testenv:py312] +basepython = python3.12 +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + [testenv:pep8] basepython = python3 -deps = flake8==3.9.2 +deps = flake8==7.1.1 git+https://github.com/juju/charm-tools.git commands = flake8 {posargs} src unit_tests