From 2559722a7211fbb4193652a8a087d50528b3335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Fri, 11 Sep 2020 16:09:32 +0200 Subject: [PATCH] Fix pep8 and lower-constraints gates PEP8 needs upgrade of hacking version and lower-constraints require us to start having stuff supporting Python 3.8 in lower-constraints.txt. Both are fixed by this commit. Change-Id: I1d0b244f98dbe2228edfcc0caae70b43013a18ad --- kuryr/cmd/status.py | 1 + kuryr/lib/opts.py | 7 ++++--- kuryr/tests/unit/test_opts.py | 6 +++--- lower-constraints.txt | 4 ++-- requirements.txt | 2 +- test-requirements.txt | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/kuryr/cmd/status.py b/kuryr/cmd/status.py index be095400..69d6c7fa 100644 --- a/kuryr/cmd/status.py +++ b/kuryr/cmd/status.py @@ -50,5 +50,6 @@ def main(): return upgradecheck.main( cfg.CONF, project='kuryr', upgrade_command=Checks()) + if __name__ == '__main__': sys.exit(main()) diff --git a/kuryr/lib/opts.py b/kuryr/lib/opts.py index 45bf8e90..338ea2a1 100644 --- a/kuryr/lib/opts.py +++ b/kuryr/lib/opts.py @@ -74,6 +74,7 @@ def list_kuryr_opts(): :returns: a list of (group_name, opts) tuples """ - return ([(k, copy.deepcopy(o)) for k, o in _kuryr_opts] + - list_neutron_opts() + - [(config.binding_group, config.binding_opts)]) + opts = [(k, copy.deepcopy(o)) for k, o in _kuryr_opts] + opts += list_neutron_opts() + opts += [(config.binding_group, config.binding_opts)] + return opts diff --git a/kuryr/tests/unit/test_opts.py b/kuryr/tests/unit/test_opts.py index c7125a37..f8514518 100644 --- a/kuryr/tests/unit/test_opts.py +++ b/kuryr/tests/unit/test_opts.py @@ -32,6 +32,6 @@ class OptsTest(base.TestCase): def test_list_kuryr_opts(self, list_neutron_opts): list_neutron_opts.return_value = self._fake_neutron_opts - self.assertEqual(self._fake_kuryr_opts + self._fake_neutron_opts + - [(self._fake_binding_group, self._fake_binding_opts)], - kuryr_opts.list_kuryr_opts()) + opts = self._fake_kuryr_opts + self._fake_neutron_opts + [( + self._fake_binding_group, self._fake_binding_opts)] + self.assertEqual(opts, kuryr_opts.list_kuryr_opts()) diff --git a/lower-constraints.txt b/lower-constraints.txt index 46233307..30252d7e 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -22,7 +22,7 @@ fixtures==3.0.0 flake8==2.5.5 future==0.16.0 futurist==1.2.0 -greenlet==0.4.10 +greenlet==0.4.13 hacking==0.12.0 imagesize==0.7.1 iso8601==0.1.11 @@ -75,7 +75,7 @@ Pygments==2.2.0 pyinotify==0.9.6 pyparsing==2.1.0 pyperclip==1.5.27 -pyroute2==0.4.21 +pyroute2==0.5.6 python-dateutil==2.5.3 python-editor==1.0.3 python-keystoneclient==3.8.0 diff --git a/requirements.txt b/requirements.txt index ce945eea..ab37d0c0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,5 @@ oslo.log>=3.36.0 # Apache-2.0 oslo.upgradecheck>=0.1.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 -pyroute2>=0.4.21;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2) +pyroute2>=0.5.6;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2) python-neutronclient>=6.7.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 9e0d3143..8f382365 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=3.0.1,<3.1.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD stestr>=1.0.0 # Apache-2.0