The packaging migration (setup.py → pyproject.toml, drop six, refresh docs)
landed in commits 7df4a94..``HEAD``. The items below were identified
during that sweep but deliberately left out because each is large enough
to warrant its own focused PR.
Each of these is a near-mechanical refactor with a wide diff. Best done one-at-a-time so reviewers can read each change as a single transformation.
- Drop explicit ``object`` base class.
class Foo(object):→class Foo:. No behavior change in Py3. - Modernize ``super()`` calls.
super(ClassName, self).method(...)→super().method(...). The arguments are required only in Py2. - Adopt f-strings.
"x={0}".format(x)and"x=%s" % x→f"x={x}". Skip for logging calls — those should keep%sformatting so the logger can short-circuit when the level is disabled. - Switch typing imports to builtins.
List[X]/Dict[K, V]/Optional[X]→list[X]/dict[K, V]/X | Noneonce a Python 3.10+ floor is acceptable (we already require 3.13, so this is safe today).
- Fix the ~23 pre-existing flake8 import-order errors. Run
tox -e lintto see the list. MostlyI100/I201/I202undercloudbridge/providers/azure,gcp, andopenstack. - Consider replacing flake8 + flake8-import-order with ruff. Ruff
reads
pyproject.toml, runs ~100× faster, and covers import ordering (I) plus most flake8 plugins out of the box. - Consider adding mypy / pyright in CI. The codebase has no type hints today; this would be a meaningful uplift, not a one-PR task.
- Untracked local-dev artifacts at the repo root —
azure.txt,openstack.txt,docs2/,script_test.py,openstack.log. Each likely belongs in.gitignoreor in a developer's untracked workspace; investigate before either committing or deleting.
- Reap stale ``cb-*`` resources on the OpenStack DevStack target.
When an integration test fails partway, its cleanup sometimes
doesn't run (e.g., cleanup itself errors), leaving orphan volumes,
servers, floating IPs, and networks named
cb-<role>-<uuid>in the demo project. They accumulate across CI runs and eventually trip the project quotas (we hitVolumeLimitExceededonce already). Quotas have been raised generously as a stopgap, but the proper fix is a janitor: a small script that runs at the start of eachtox -e py3.13-openstackinvocation (or as a host-side systemd timer) and deletes anycb-*-named resource older than ~1 hour. Candidate hook: asetUp-level fixture intests/helpers/__init__.pythat nukes leftovers before the run, scoped by the cloudbridge naming convention so it can't touch unrelated tenants.