Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Closes-Issue: PRODX-13225
Change-Id: Ia59a23a36ebb8548a20e894000f7342c73012eac
(cherry picked from commit a318f6d77c0b354b4aee2fe9d7651d595adcf38e)
diff --git a/.zuul.yaml b/.zuul.yaml
index d958843..4af2e62 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -27,6 +27,7 @@
devstack_plugins:
barbican: https://opendev.org/openstack/barbican
devstack_localrc:
+ USE_PYTHON3: true
NOVA_BACKEND: LVM
LVM_VOLUME_CLEAR: none
devstack_local_conf:
diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py
index 4a141ab..615e08b 100644
--- a/barbican_tempest_plugin/tests/scenario/manager.py
+++ b/barbican_tempest_plugin/tests/scenario/manager.py
@@ -396,8 +396,9 @@
addresses = (server['addresses'][network['name']]
if network else [])
for address in addresses:
- if (address['version'] == CONF.validation.ip_version_for_ssh
- and address['OS-EXT-IPS:type'] == 'fixed'):
+ ip_version_for_ssh = CONF.validation.ip_version_for_ssh
+ if (address['version'] == ip_version_for_ssh and
+ address['OS-EXT-IPS:type'] == 'fixed'):
return address['addr']
raise exceptions.ServerUnreachable(server_id=server['id'])
else:
diff --git a/test-requirements.txt b/test-requirements.txt
index b99db27..bf16924 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,11 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-hacking<0.13,>=0.12.0 # Apache-2.0
-# remove this pyflakes from here once you bump the
-# hacking to 3.2.0 or above. hacking 3.2.0 takes
-# care of pyflakes version compatibilty.
-pyflakes>=2.1.1
+hacking>=3.2.0,<3.3.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index efc6c97..6e24b61 100644
--- a/tox.ini
+++ b/tox.ini
@@ -26,8 +26,9 @@
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
+# W504 line break after binary operator
show-source = True
-ignore = E123,E125
+ignore = E123,E125,W504
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build