From 7ce947c8feeac967a3a5ce3f3c307b6665475e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 4 Nov 2020 10:05:34 +0100 Subject: [PATCH 01/10] 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: Ib41e75006acf4dd72968ab1896034f75899e8c34 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7c6169b..315f961 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.1.1 -envlist = py38,pep8 +envlist = py3,pep8 basepython = python3 ignore_basepython_conflict = true -- GitLab From bdce5a0b8a925a1f2a479c4ab77672f8c9523556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 4 Nov 2020 10:52:08 +0100 Subject: [PATCH 02/10] 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: Ic59d8cefc410c2b9bfc451c721106db921787433 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 7c6169b..32b9edd 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ ignore_basepython_conflict = true [testenv] 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 commands = stestr run --slowest {posargs} @@ -25,7 +25,7 @@ commands = python setup.py test --coverage --coverage-package-name=oslo_versione [testenv:docs] whitelist_externals = rm deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = rm -fr doc/build -- GitLab From e8062fc9e3e6b43c426bdba1d8425ee8635ba976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Fri, 18 Dec 2020 15:14:01 +0100 Subject: [PATCH 03/10] 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: Ied61e65006ad54803453776e763594e216be1353 --- .zuul.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index 4b91294..3605684 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,7 +5,6 @@ templates: - check-requirements - lib-forward-testing-python3 - - openstack-lower-constraints-jobs - openstack-python3-wallaby-jobs - periodic-stable-jobs - publish-openstack-docs-pti -- GitLab From 117d28ee8ff1427592276da5dec19ae9980d0baf Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Thu, 18 Feb 2021 14:25:23 +0100 Subject: [PATCH 04/10] Dropping lower constraints references As a follow up to Ied61e65006ad54803453776e763594e216be1353, remove the lower-constraints.txt file and its references. Change-Id: I2baa6d318cdbbf86da86cc94171cc7714dbdba3a --- lower-constraints.txt | 69 ------------------------------------------- tox.ini | 6 ---- 2 files changed, 75 deletions(-) delete mode 100644 lower-constraints.txt diff --git a/lower-constraints.txt b/lower-constraints.txt deleted file mode 100644 index 4d20032..0000000 --- a/lower-constraints.txt +++ /dev/null @@ -1,69 +0,0 @@ -amqp==2.1.1 -appdirs==1.3.0 -Babel==2.3.4 -bandit==1.4.0 -cachetools==2.0.0 -contextlib2==0.4.0 -coverage==4.0 -debtcollector==1.2.0 -eventlet==0.18.2 -extras==1.0.0 -fasteners==0.7.0 -fixtures==3.0.0 -futurist==1.2.0 -gitdb==0.6.4 -GitPython==1.0.1 -greenlet==0.4.15 -iso8601==0.1.11 -Jinja2==2.10 -jsonschema==3.2.0 -keystoneauth1==3.4.0 -kombu==4.0.0 -linecache2==1.0.0 -MarkupSafe==1.1.1 -mox3==0.20.0 -msgpack-python==0.4.0 -netaddr==0.7.18 -netifaces==0.10.4 -os-client-config==1.28.0 -oslo.concurrency==3.26.0 -oslo.config==5.2.0 -oslo.context==2.19.2 -oslo.i18n==3.15.3 -oslo.log==3.36.0 -oslo.messaging==5.29.0 -oslo.middleware==3.31.0 -oslo.serialization==2.18.0 -oslo.service==1.24.0 -oslo.utils==4.7.0 -oslotest==3.2.0 -Paste==2.0.2 -PasteDeploy==1.5.0 -pbr==2.0.0 -pika==0.10.0 -pika-pool==0.1.3 -prettytable==0.7.2 -pyinotify==0.9.6 -pyparsing==2.1.0 -python-dateutil==2.5.3 -python-mimeparse==1.6.0 -python-subunit==1.0.0 -pytz==2013.6 -PyYAML==3.13 -repoze.lru==0.7 -requests==2.14.2 -requestsexceptions==1.2.0 -rfc3986==0.3.1 -Routes==2.3.1 -six==1.10.0 -smmap==0.9.0 -statsd==3.2.1 -stestr==2.0.0 -stevedore==1.20.0 -tenacity==3.2.1 -testtools==2.2.0 -traceback2==1.4.0 -unittest2==1.1.0 -vine==1.1.4 -WebOb==1.7.1 -wrapt==1.7.0 diff --git a/tox.ini b/tox.ini index 315f961..99185ae 100644 --- a/tox.ini +++ b/tox.ini @@ -38,12 +38,6 @@ commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html -[testenv:lower-constraints] -deps = - -c{toxinidir}/lower-constraints.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt - [flake8] # E123, E125 skipped as they are invalid PEP-8. # W504 skipped as you must choose this or W503 -- GitLab From 0a3da6191121daba279897c5b5b71bb8c67b07d8 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Thu, 18 Mar 2021 11:32:17 +0000 Subject: [PATCH 05/10] 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: Ia0ffbb9e95fe324557718f73b932410d4dac2a8c --- 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 474f7eb..57fb690 100644 --- a/releasenotes/source/index.rst +++ b/releasenotes/source/index.rst @@ -6,6 +6,7 @@ :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 4fa96d65c89f8462b197bd9c7ffe9551c3141224 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Thu, 18 Mar 2021 11:32:20 +0000 Subject: [PATCH 06/10] 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: Ie1b80f4e07cfb9f0a9fd16fbbbfe9f9eef17951c --- .zuul.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index 3605684..adbcf51 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,7 +5,7 @@ templates: - check-requirements - lib-forward-testing-python3 - - openstack-python3-wallaby-jobs + - openstack-python3-xena-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 -- GitLab From a1ecfaa872b0e60f0202e812d152ce97adeb8a69 Mon Sep 17 00:00:00 2001 From: Daniel Bengtsson Date: Tue, 23 Mar 2021 13:10:42 +0100 Subject: [PATCH 07/10] 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: Ie89835eb10a2211abad4d67b23ea8165daca37d2 --- .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 From 59c0aadb89efb28040cb86e6e51e2892f31f211f Mon Sep 17 00:00:00 2001 From: yangyawei Date: Fri, 4 Jun 2021 15:59:19 +0800 Subject: [PATCH 08/10] Changed minversion in tox to 3.18.0 The patch bumps min version of tox to 3.18.0 in order to replace tox's whitelist_externals by allowlist_externals option: https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23 Change-Id: Id73cfadea402d211a807b7f8df4dd374a624dece --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 558f45e..c4fa745 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 3.1.1 +minversion = 3.18.0 envlist = py3,pep8 basepython = python3 ignore_basepython_conflict = true @@ -23,7 +23,7 @@ commands = {posargs} commands = python setup.py test --coverage --coverage-package-name=oslo_versionedobjects --testr-args='{posargs}' [testenv:docs] -whitelist_externals = rm +allowlist_externals = rm deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt @@ -32,7 +32,7 @@ commands = sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] -whitelist_externals = rm +allowlist_externals = rm deps = {[testenv:docs]deps} commands = rm -rf releasenotes/build -- GitLab From 63cdc14853d9a0cd7da6416a5ca60121e86fd218 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 16 Jul 2021 11:26:06 +0900 Subject: [PATCH 09/10] Do not patch inspect.argspec directly This fixes the leftover of c1933306ddd8df09185c5d32ff2603d826d4ad5a and makes the get_method_spec method patched instead of inspect.argspec because now the method wraps call to inspect.argspec. Change-Id: Id3c18d151a6f239f7ceff4e0b24f4006963827ea --- oslo_versionedobjects/tests/test_fixture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_versionedobjects/tests/test_fixture.py b/oslo_versionedobjects/tests/test_fixture.py index 5ab392d..b22f441 100644 --- a/oslo_versionedobjects/tests/test_fixture.py +++ b/oslo_versionedobjects/tests/test_fixture.py @@ -584,7 +584,7 @@ class TestObjectVersionChecker(test.TestCase): argspec = 'cubone' self._add_class(self.obj_classes, ExtraDataObj) - with mock.patch('inspect.getargspec') as mock_gas: + with mock.patch.object(fixture, 'get_method_spec') as mock_gas: mock_gas.return_value = argspec fp = self.ovc._get_fingerprint(ExtraDataObj.__name__, extra_data_func=get_data) -- GitLab From 07fd2f2c4782636e798f40e47ebfa8ba566b014e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 15 Jul 2021 20:50:05 +0900 Subject: [PATCH 10/10] Replace deprecated inspect.getargspec inspect.getargspec was deprecated since Python 3.0 and inspect.getfullargspec is its replacement with correct handling of function annotations and keyword-only parameters[1]. [1] https://docs.python.org/3/library/inspect.html#inspect.getargspec Change-Id: I29478df88665ee5311e3ba308ab645c47e5b0fc8 --- oslo_versionedobjects/test.py | 4 ++-- oslo_versionedobjects/tests/test_fixture.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/oslo_versionedobjects/test.py b/oslo_versionedobjects/test.py index 32bc86f..4589e01 100644 --- a/oslo_versionedobjects/test.py +++ b/oslo_versionedobjects/test.py @@ -178,8 +178,8 @@ class TestCase(testtools.TestCase): baseclass) for name in sorted(implmethods.keys()): - baseargs = inspect.getargspec(basemethods[name]) - implargs = inspect.getargspec(implmethods[name]) + baseargs = inspect.getfullargspec(basemethods[name]) + implargs = inspect.getfullargspec(implmethods[name]) self.assertEqual(baseargs, implargs, "%s args don't match base class %s" % diff --git a/oslo_versionedobjects/tests/test_fixture.py b/oslo_versionedobjects/tests/test_fixture.py index b22f441..f43d4df 100644 --- a/oslo_versionedobjects/tests/test_fixture.py +++ b/oslo_versionedobjects/tests/test_fixture.py @@ -757,9 +757,11 @@ class TestMethodSpec(test.TestCase): self._test_method3 = test_method3 def test_method_spec_compat(self): - self.assertEqual(inspect.getargspec(self._test_method1), + self.assertEqual(inspect.ArgSpec(args=['a', 'b', 'kw1'], varargs=None, + keywords='kwargs', defaults=(123,)), fixture.get_method_spec(self._test_method1)) - self.assertEqual(inspect.getargspec(self._test_method2), + self.assertEqual(inspect.ArgSpec(args=['a', 'b'], varargs='args', + keywords=None, defaults=None), fixture.get_method_spec(self._test_method2)) self.assertEqual(inspect.getfullargspec(self._test_method3), fixture.get_method_spec(self._test_method3)) -- GitLab