Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Remove hacking and friends from lower-constraints, they are not needed
there at all.

Align lower-constraints for new pip [1]

Fix flake8 E305 and E117 and set W504 as ignored

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html

Change-Id: Idae87291f4556eee77d40ab49f0d151435d70875
This commit is contained in:
Martin Chacon Piza 2020-12-15 10:50:08 +01:00
parent d3a6a068f0
commit 35a9b57f91
10 changed files with 21 additions and 16 deletions

View File

@ -1,4 +1,4 @@
appdirs==1.3.0
appdirs==1.4.0
Babel==2.3.4
bandit==1.4.0
configparser==3.5.0
@ -7,21 +7,21 @@ debtcollector==1.2.0
docutils==0.11
extras==1.0.0
fixtures==3.0.0
flake8==2.5.5
flake8==3.6.0
funcsigs==1.0.0
future==0.16.0
gevent==1.2.2
gitdb==0.6.4
GitPython==1.0.1
greenlet==0.4.10
hacking==0.12.0
hacking==3.0.1
iso8601==0.1.11
Jinja2==2.10
jira==2.0.0
kazoo==2.2
keystoneauth1==3.4.0
linecache2==1.0.0
mccabe==0.2.1
mccabe==0.6.0
monasca-common==2.16.0
monasca-statsd==1.4.0
monotonic==0.6
@ -39,10 +39,10 @@ oslo.policy==1.30.0
oslo.serialization==2.18.0
oslo.utils==3.33.0
oslotest==3.2.0
pbr==2.0.0
pbr==3.1.1
pep8==1.5.7
psycopg2==2.8.4
pyflakes==0.8.1
pyflakes==2.0.0
pyinotify==0.9.6
PyMySQL==0.7.6
pyparsing==2.1.0

View File

@ -290,6 +290,7 @@ def _format_dimensions(notification):
return dimensions
email_notifier_group = cfg.OptGroup(name='%s_notifier' % EmailNotifier.type)
email_notifier_opts = [
cfg.StrOpt(name='from_addr'),

View File

@ -141,6 +141,7 @@ class HipChatNotifier(abstract_notifier.AbstractNotifier):
self._log.exception("Error trying to send to hipchat on URL {}".format(url))
return False
hipchat_notifier_group = cfg.OptGroup(name='%s_notifier' % HipChatNotifier.type)
hipchat_notifier_opts = [
cfg.IntOpt(name='timeout', default=5, min=1),

View File

@ -223,6 +223,7 @@ class JiraNotifier(AbstractNotifier):
if jira_comment_message:
jira_obj.add_comment(issue, jira_comment_message)
jira_notifier_group = cfg.OptGroup(name='%s_notifier' % JiraNotifier.type)
jira_notifier_opts = [
cfg.IntOpt(name='timeout', default=5, min=1),

View File

@ -198,6 +198,7 @@ class SlackNotifier(abstract_notifier.AbstractNotifier):
.format(url, data_format))
return False
slack_notifier_group = cfg.OptGroup(name='%s_notifier' % SlackNotifier.type)
slack_notifier_opts = [
cfg.IntOpt(name='timeout', default=5, min=1),

View File

@ -91,6 +91,7 @@ class WebhookNotifier(abstract_notifier.AbstractNotifier):
self._log.exception("Error trying to post on URL {}".format(url))
return False
webhook_notifier_group = cfg.OptGroup(name='%s_notifier' % WebhookNotifier.type)
webhook_notifier_opts = [
cfg.IntOpt(name='timeout', default=5, min=1)

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
pbr>=3.1.1 # Apache-2.0
debtcollector>=1.2.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
monasca-statsd>=1.4.0 # Apache-2.0

View File

@ -5,11 +5,10 @@
bandit!=1.6.0,>=1.1.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
hacking>=1.1.0,<1.2.0 # Apache-2.0
hacking>=3.0.1,<3.1.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
coverage!=4.4,>=4.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0

View File

@ -67,7 +67,8 @@ max-line-length = 100
# H201 no 'except:' at least use 'except Exception:'
# H202: assertRaises Exception too broad
# H405 multi line docstring summary not separated with an empty line
ignore = F821,H201,H202,H405
# W504 line break occurred after a binary operator
ignore = F821,H201,H202,H405,W504
exclude=.venv,.git,.tox,dist,*egg,build
[hacking]