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. Change-Id: I7614df314c211dc3acca2e3e8cb647bddddd6c16
This commit is contained in:
parent
fc3c885e3e
commit
08739b0377
|
@ -59,6 +59,7 @@ def retry(retries=5, delay=2.0, exc_types=(RequestException,)):
|
|||
return f_retry
|
||||
return decorator
|
||||
|
||||
|
||||
def create_login_payload():
|
||||
if os.environ.get('GRAFANA_USERS'):
|
||||
try:
|
||||
|
@ -71,6 +72,7 @@ def create_login_payload():
|
|||
grafana_users = GRAFANA_USERS
|
||||
return grafana_users
|
||||
|
||||
|
||||
@retry(retries=24, delay=5.0)
|
||||
def login(session, user):
|
||||
r = session.post('{url}/login'.format(url=GRAFANA_URL),
|
||||
|
@ -78,6 +80,7 @@ def login(session, user):
|
|||
timeout=5)
|
||||
r.raise_for_status()
|
||||
|
||||
|
||||
def create_dashboard_payload(json_path):
|
||||
with open(json_path, 'r') as f:
|
||||
dashboard = json.load(f)
|
||||
|
@ -88,6 +91,7 @@ def create_dashboard_payload(json_path):
|
|||
'overwrite': True
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
for user in create_login_payload():
|
||||
logging.info('Opening a Grafana session...')
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
"""Health check will returns 0 when service is working properly."""
|
||||
|
||||
import logging
|
||||
from urllib import request
|
||||
import os
|
||||
import sys
|
||||
from urllib import request
|
||||
|
||||
|
||||
LOG_LEVEL = logging.getLevelName(os.environ.get('LOG_LEVEL', 'INFO'))
|
||||
|
|
|
@ -14,13 +14,11 @@ eventlet==0.18.2
|
|||
extras==1.0.0
|
||||
falcon==2.0.0
|
||||
fixtures==3.0.0
|
||||
flake8==2.5.5
|
||||
future==0.16.0
|
||||
gevent==1.2.2
|
||||
gitdb==0.6.4
|
||||
GitPython==1.0.1
|
||||
greenlet==0.4.10
|
||||
hacking==0.12.0
|
||||
imagesize==0.7.1
|
||||
iso8601==0.1.11
|
||||
Jinja2==2.10
|
||||
|
@ -54,7 +52,6 @@ oslotest==3.2.0
|
|||
Paste==2.0.2
|
||||
PasteDeploy==1.5.0
|
||||
pbr==2.0.0
|
||||
pep8==1.5.7
|
||||
positional==1.2.1
|
||||
pycadf==1.1.0
|
||||
pyflakes==0.8.1
|
||||
|
|
|
@ -55,6 +55,7 @@ def _hex_to_unicode(hex_raw):
|
|||
hex_str = hex_str_raw.decode('utf-8', 'replace')
|
||||
return hex_str
|
||||
|
||||
|
||||
# NOTE(trebskit) => http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
|
||||
UNICODE_MESSAGES = [
|
||||
# Unicode is evil...
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||
bandit!=1.6.0,>=1.1.0 # Apache-2.0
|
||||
bashate>=0.5.1 # Apache-2.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue