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
for co-installing.

Change-Id: Ibef3bbaceb61612d678c542bc8c95da24a7e2c87
This commit is contained in:
Andreas Jaeger 2020-03-31 21:53:05 +02:00 committed by Andreas Jaeger
parent 8ecb68d75c
commit f037523797
7 changed files with 9 additions and 7 deletions

View File

@ -25,11 +25,9 @@ eventlet==0.18.2
extras==1.0.0 extras==1.0.0
fasteners==0.7.0 fasteners==0.7.0
fixtures==3.0.0 fixtures==3.0.0
flake8==2.5.5
funcsigs==1.0.0 funcsigs==1.0.0
futurist==1.2.0 futurist==1.2.0
greenlet==0.4.10 greenlet==0.4.10
hacking==0.12.0
horizon==17.1.0 horizon==17.1.0
idna==2.6 idna==2.6
imagesize==0.7.1 imagesize==0.7.1
@ -72,14 +70,12 @@ osprofiler==1.4.0
Paste==2.0.2 Paste==2.0.2
PasteDeploy==1.5.0 PasteDeploy==1.5.0
pbr==2.0.0 pbr==2.0.0
pep8==1.5.7
pika-pool==0.1.3 pika-pool==0.1.3
pika==0.10.0 pika==0.10.0
Pint==0.5 Pint==0.5
positional==1.2.1 positional==1.2.1
prettytable==0.7.2 prettytable==0.7.2
pycparser==2.18 pycparser==2.18
pyflakes==0.8.1
Pygments==2.2.0 Pygments==2.2.0
pyinotify==0.9.6 pyinotify==0.9.6
pymongo==3.0.2 pymongo==3.0.2

View File

@ -65,7 +65,7 @@ class SimpleExpressionWidget(django_forms.MultiWidget):
def decompress(self, expr): def decompress(self, expr):
if expr: if expr:
return re.search('^(\w+)\((.*)\) ([<>=]*) (.*)$', expr).groups() return re.search(r'^(\w+)\((.*)\) ([<>=]*) (.*)$', expr).groups()
else: else:
return [None, None, None, None] return [None, None, None, None]

View File

@ -26,4 +26,5 @@ class Monitoring(horizon.Dashboard):
policy_rules = (("monitoring", "monitoring:monitoring"),) policy_rules = (("monitoring", "monitoring:monitoring"),)
permissions = (('openstack.services.' + settings.MONITORING_SERVICE_TYPE),) permissions = (('openstack.services.' + settings.MONITORING_SERVICE_TYPE),)
horizon.register(Monitoring) horizon.register(Monitoring)

View File

@ -21,6 +21,7 @@ class NotificationType(object):
WEBHOOK = "WEBHOOK" WEBHOOK = "WEBHOOK"
PAGERDUTY = "PAGERDUTY" PAGERDUTY = "PAGERDUTY"
EMAIL_VALIDATOR = validators.EmailValidator( EMAIL_VALIDATOR = validators.EmailValidator(
message=_("Address must contain a valid email address.")) message=_("Address must contain a valid email address."))
WEBHOOK_VALIDATOR = validators.URLValidator( WEBHOOK_VALIDATOR = validators.URLValidator(

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8 # Hacking already pins down pep8, pyflakes and flake8
hacking>=1.1.0,<1.2.0 # Apache-2.0 hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD mock>=2.0.0 # BSD

View File

@ -22,6 +22,8 @@
Installation script for the OpenStack Dashboard development virtualenv. Installation script for the OpenStack Dashboard development virtualenv.
""" """
# flake8: noqa
from __future__ import print_function from __future__ import print_function
import os import os

View File

@ -37,7 +37,9 @@ commands = /bin/bash run_tests.sh -N --coverage {posargs}
[flake8] [flake8]
# F405 TEMPLATES may be undefined, or defined from star imports # F405 TEMPLATES may be undefined, or defined from star imports
# (because it is not easy to avoid this in openstack_dashboard.test.settings) # (because it is not easy to avoid this in openstack_dashboard.test.settings)
ignore = F405 # W504 line break after binary operator
# (we use W503 instead)
ignore = F405,W504
max-line-length = 100 max-line-length = 100
builtins = _ builtins = _
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/* exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*