Fix issues related to py312 compatibility
Summary of changes: - Bump flake8 from 3.9.2 to 7.1.1 - Remove pinning for setuptools - Add py312 section to tox.ini [testenv] - Shortened lines failing flake8 Change-Id: Iac8d6493a0c6f0e5f4ed7516d1bc1b65df1be8f6
This commit is contained in:
@@ -2,11 +2,6 @@
|
||||
# within individual charm repos. See the 'global' dir contents for available
|
||||
# choices of *requirements.txt files for OpenStack Charms:
|
||||
# https://github.com/openstack-charmers/release-tools
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -34,8 +34,8 @@ charms_openstack.charm.use_defaults('charm.default-select-release')
|
||||
|
||||
|
||||
class NovaCellControllerCharm(charms_openstack.charm.HAOpenStackCharm):
|
||||
"""NovaCellControllerCharm provides the specialisation of the OpenStackCharm
|
||||
functionality to manage a nova_cell_controller unit.
|
||||
"""NovaCellControllerCharm provides the specialisation of the
|
||||
OpenStackCharm functionality to manage a nova_cell_controller unit.
|
||||
"""
|
||||
|
||||
release = 'mitaka'
|
||||
|
||||
@@ -61,9 +61,8 @@ def request_credentials():
|
||||
@reactive.when('shared-db.available')
|
||||
@reactive.when('amqp.available')
|
||||
def render_stuff(*args):
|
||||
"""Render the configuration for Nova cell controller when all the interfaces
|
||||
are available.
|
||||
|
||||
"""Render the configuration for Nova cell controller when all the
|
||||
interfaces are available.
|
||||
"""
|
||||
hookenv.log("about to call the render_configs with {}".format(args))
|
||||
with charm.provide_charm_instance() as nova_cell_controller_charm:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
9
tox.ini
9
tox.ini
@@ -66,6 +66,13 @@ 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:py310]
|
||||
basepython = python3.10
|
||||
deps =
|
||||
@@ -75,7 +82,7 @@ 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user