From 09c42beb5e9b02b146a0e6c1ddb667ebfd72b3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 4 Nov 2020 10:05:16 +0100 Subject: [PATCH 1/9] Use py3 as the default runtime for tox Moving on py3 as the default runtime for tox to avoid to update this at each new cycle. Wallaby support officially the following runtimes [1]: - Python 3.6 - Python 3.8 During Victoria Python 3.7 was used as the default runtime [2] however this version isn't longer officially supported. [1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby [2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria Change-Id: I3a98d1c258389968a892d6ccd067d3b8fb78a29a --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 98cf387..a7cab70 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 -- GitLab From 20b199e36df344637e6d48e412b251cd13cb1312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 4 Nov 2020 10:51:29 +0100 Subject: [PATCH 2/9] Use TOX_CONSTRAINTS_FILE UPPER_CONSTRAINTS_FILE is old name and deprecated This allows to use upper-constraints file as more readable way instead of UPPER_CONSTRAINTS_FILE=. [1] https://review.opendev.org/#/c/722814/ [2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file Change-Id: I6d07e0ed66edc95f4afec6829b46fca679cd5814 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 98cf387..0b0cdd2 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ setenv = 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} -- GitLab From a962943bdaa746ad238f003f56556eb02d1ea8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Fri, 18 Dec 2020 15:13:08 +0100 Subject: [PATCH 3/9] Dropping lower constraints testing We facing errors related to the new pip resolver, this topic was discussed on the ML and QA team proposed to to test lower-constraints [1]. I propose to drop this test because the complexity and recurring pain needed to maintain that now exceeds the benefits provided by this mechanismes. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html Change-Id: I3eafc92ba7c7305b1a73d3f96c427ed12c96dbf7 --- .zuul.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index b45d2b6..48a2a00 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,4 +5,3 @@ - check-requirements - release-notes-jobs-python3 - periodic-stable-jobs - - openstack-lower-constraints-jobs -- GitLab From 456bd8521f2a334eb056dacdc44320f36a64d223 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 11 Feb 2021 11:36:35 +0000 Subject: [PATCH 4/9] Remove six There are only two uses of this. Oddly, we never specified this dependency directly and were instead relying on it being included indirectly. Change-Id: I3229750f3c47689c6b8d9db80a962a755b5a5da9 Signed-off-by: Stephen Finucane --- oslo_upgradecheck/upgradecheck.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/oslo_upgradecheck/upgradecheck.py b/oslo_upgradecheck/upgradecheck.py index 62c9a68..8c50299 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 = ( -- GitLab From f234316cce235d33b867a5c485b95b581e0f4702 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 11 Feb 2021 11:35:19 +0000 Subject: [PATCH 5/9] Uncap PrettyTable This is now maintained as a Jazzband project [1]. [1] https://github.com/jazzband/prettytable Change-Id: Id484bf8fe017bf8f6784155462640840b2053677 Signed-off-by: Stephen Finucane --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2f5f024..45ca61f 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 -- GitLab From 8a43c37004813d0efdf967e4f1050e61890636d4 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 11 Feb 2021 12:03:01 +0000 Subject: [PATCH 6/9] Remove lower-constraints remnants These were missed in change I3eafc92ba7c7305b1a73d3f96c427ed12c96dbf7. Change-Id: Idf7148bcf588efbd20352bf2160ecee573156444 Signed-off-by: Stephen Finucane --- lower-constraints.txt | 9 --------- tox.ini | 32 ++++++++++++-------------------- 2 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 lower-constraints.txt diff --git a/lower-constraints.txt b/lower-constraints.txt deleted file mode 100644 index c30a967..0000000 --- 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/tox.ini b/tox.ini index 5063b82..09df6d4 100644 --- a/tox.ini +++ b/tox.ini @@ -8,10 +8,9 @@ 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:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt @@ -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 = _ -- GitLab From db3e3a98b81860b66fd87980d5a140d4d9a7ec12 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Thu, 18 Mar 2021 11:30:48 +0000 Subject: [PATCH 7/9] Update master for stable/wallaby Add file to the reno documentation build to show release notes for stable/wallaby. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/wallaby. Sem-Ver: feature Change-Id: Id0e5435b082b3079e98081adf59e7177675205ea --- releasenotes/source/index.rst | 1 + releasenotes/source/wallaby.rst | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/source/wallaby.rst diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst index e888e66..93d1fe0 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 0000000..d77b565 --- /dev/null +++ b/releasenotes/source/wallaby.rst @@ -0,0 +1,6 @@ +============================ +Wallaby Series Release Notes +============================ + +.. release-notes:: + :branch: stable/wallaby -- GitLab From 276ecd787991fda3b8a5eaa9fb4dcd6f7d936cd2 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Thu, 18 Mar 2021 11:31:12 +0000 Subject: [PATCH 8/9] Add Python3 xena unit tests This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for xena. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: Ic8d89a2ba2d92bd892c892d269e20e1b143306d6 --- .zuul.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index 48a2a00..caf40c8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,7 +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 -- GitLab From 75fe37659c3d34956b3436e74ea312a06f003810 Mon Sep 17 00:00:00 2001 From: Daniel Bengtsson Date: Tue, 23 Mar 2021 13:09:49 +0100 Subject: [PATCH 9/9] Move flake8 as a pre-commit local target. The goal here is to avoid conflicts between flake8 and hacking version each 2 days. Inspired from nova's approach[1]. The flake8 version to install will be determined by hacking and requirements[2] will stay aligned instead of relying on different versions. [1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35 [2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1 Change-Id: I996bcc6952a80aaccf50bb8ade579ebd960f4292 --- .pre-commit-config.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d94556..08aef91 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)/.*$' -- GitLab