diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d945567450344fa94ec9e6280095e86a6c532b0..08aef91b213be4ddd939a50b8dc41a603a8cc14f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ default_language_version: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0 + rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0 hooks: - id: trailing-whitespace # Replaces or checks mixed line ending @@ -27,9 +27,13 @@ repos: - id: debug-statements - id: check-yaml files: .*\.(yaml|yml)$ - - repo: https://gitlab.com/pycqa/flake8 - rev: 181bb46098dddf7e2d45319ea654b4b4d58c2840 # 3.8.3 + - repo: local hooks: - id: flake8 + name: flake8 additional_dependencies: - hacking>=3.0.1,<3.1.0 + language: python + entry: flake8 + files: '^.*\.py$' + exclude: '^(doc|releasenotes|tools)/.*$' diff --git a/.zuul.yaml b/.zuul.yaml index b45d2b627c4182712502acdf0075921677dbfc67..caf40c89d72e6032b38d37d5073434c3e01d5693 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,8 +1,7 @@ - project: templates: - publish-openstack-docs-pti - - openstack-python3-wallaby-jobs + - openstack-python3-xena-jobs - check-requirements - release-notes-jobs-python3 - periodic-stable-jobs - - openstack-lower-constraints-jobs diff --git a/lower-constraints.txt b/lower-constraints.txt deleted file mode 100644 index c30a9678f8c6a08492789df0811a95f369ae0eb0..0000000000000000000000000000000000000000 --- a/lower-constraints.txt +++ /dev/null @@ -1,9 +0,0 @@ -oslo.config==5.2.0 -oslo.i18n==3.15.3 -enum34==1.0.4 -PrettyTable==0.7.1 -oslotest==3.5.0 -stestr==2.0.0 -oslo.serialization==2.21.1 -oslo.utils==4.5.0 -oslo.policy==2.0.0 diff --git a/oslo_upgradecheck/upgradecheck.py b/oslo_upgradecheck/upgradecheck.py index 62c9a68b1ea5d9b63955833593a43e17761db8be..8c50299d5bc4b247e94dcf9d88c69d5f49aad315 100644 --- a/oslo_upgradecheck/upgradecheck.py +++ b/oslo_upgradecheck/upgradecheck.py @@ -21,7 +21,6 @@ import traceback import enum from oslo_config import cfg import prettytable -import six from oslo_upgradecheck._i18n import _ @@ -128,10 +127,10 @@ class UpgradeCommands(object): # assume that our locally defined option exists. if (hasattr(CONF, 'command') and hasattr(CONF.command, 'json') and CONF.command.json): - # NOTE(bnemec): We use six.text_type on the translated string to + # NOTE(bnemec): We use str on the translated string to # force immediate translation if lazy translation is in use. # See lp1801761 for details. - output = {'name': six.text_type(self.display_title), 'checks': []} + output = {'name': str(self.display_title), 'checks': []} for name, result in check_results: output['checks'].append( {'check': name, @@ -140,11 +139,11 @@ class UpgradeCommands(object): ) print(json.dumps(output)) else: - # NOTE(bnemec): We use six.text_type on the translated string to + # NOTE(bnemec): We use str on the translated string to # force immediate translation if lazy translation is in use. # See lp1801761 for details. - t = prettytable.PrettyTable([six.text_type(self.display_title)], - hrules=prettytable.ALL) + t = prettytable.PrettyTable( + [str(self.display_title)], hrules=prettytable.ALL) t.align = 'l' for name, result in check_results: cell = ( diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst index e888e66027538ed12ca1ccccd0e151b040b220b2..93d1fe0c86a888beaaacdac9be6a07e63adebde4 100644 --- a/releasenotes/source/index.rst +++ b/releasenotes/source/index.rst @@ -5,6 +5,7 @@ oslo.upgradecheck Release Notes :maxdepth: 1 unreleased + wallaby victoria ussuri train diff --git a/releasenotes/source/wallaby.rst b/releasenotes/source/wallaby.rst new file mode 100644 index 0000000000000000000000000000000000000000..d77b56599553b6fe996624b33c1663168342fb94 --- /dev/null +++ b/releasenotes/source/wallaby.rst @@ -0,0 +1,6 @@ +============================ +Wallaby Series Release Notes +============================ + +.. release-notes:: + :branch: stable/wallaby diff --git a/requirements.txt b/requirements.txt index 2f5f0247a8751b620173bb5bc7f398b10d3342a3..45ca61f347985a09cca71097066e41b009d477bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ oslo.config>=5.2.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 -PrettyTable<0.8,>=0.7.1 # BSD +PrettyTable>=0.7.1 # BSD oslo.utils>=4.5.0 # Apache-2.0 oslo.policy>=2.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 98cf3871dce9b25880dc0cdd044f3d18b31fb7ea..09df6d4603bcef93740029bf69b982488a773f0d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.1.1 -envlist = py38,pep8 +envlist = py3,pep8 skipsdist = True ignore_basepython_conflict = true @@ -8,12 +8,11 @@ ignore_basepython_conflict = true basepython = python3 usedevelop = True setenv = - VIRTUAL_ENV={envdir} - OS_DEBUG=1 - OS_STDOUT_CAPTURE=1 - OS_STDERR_CAPTURE=1 + OS_DEBUG=1 + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = stestr run --slowest {posargs} @@ -26,14 +25,14 @@ commands = {posargs} [testenv:cover] deps = {[testenv]deps} - coverage + coverage setenv = - PYTHON=coverage run --source oslo_upgradecheck --parallel-mode + PYTHON=coverage run --source oslo_upgradecheck --parallel-mode commands = - stestr run '{posargs}' - coverage combine - coverage html -d cover - coverage xml -o cover/coverage.xml + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] whitelist_externals = @@ -45,15 +44,6 @@ commands = rm -rf doc/build sphinx-build -W --keep-going -b html doc/source doc/build/html -[testenv:debug] -commands = oslo_debug_helper {posargs} - -[testenv:lower-constraints] -deps = - -c{toxinidir}/lower-constraints.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt - [testenv:releasenotes] deps = {[testenv:docs]deps} whitelist_externals = @@ -62,9 +52,11 @@ commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html +[testenv:debug] +commands = oslo_debug_helper {posargs} + [flake8] # E123, E125 skipped as they are invalid PEP-8. - show-source = True ignore = E123,E125,W504 builtins = _