Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Remove hacking and friends from lower-constraints, they are not needed for installation. Change-Id: I3f23bf09ef24fe34e128102c34382da98e10f5c1
This commit is contained in:
parent
8433aba4d6
commit
d90726a1eb
@ -7,11 +7,9 @@ debtcollector==1.2.0
|
||||
eventlet==0.18.2
|
||||
extras==1.0.0
|
||||
fixtures==3.0.0
|
||||
flake8==2.5.5
|
||||
funcsigs==1.0.0
|
||||
gitdb==0.6.4
|
||||
GitPython==1.0.1
|
||||
hacking==0.12.0
|
||||
iso8601==0.1.11
|
||||
keystoneauth1==3.4.0
|
||||
linecache2==1.0.0
|
||||
@ -24,8 +22,6 @@ oslo.config==5.2.0
|
||||
oslo.i18n==3.15.3
|
||||
oslotest==3.2.0
|
||||
pbr==2.0.0
|
||||
pep8==1.5.7
|
||||
pyflakes==0.8.1
|
||||
pyparsing==2.1.0
|
||||
python-mimeparse==1.6.0
|
||||
python-subunit==1.0.0
|
||||
|
@ -45,7 +45,7 @@ class QemuImgInfo(object):
|
||||
r"\s+(.*?)\)\s*$"), re.I)
|
||||
TOP_LEVEL_RE = re.compile(r"^([\w\d\s\_\-]+):(.*)$")
|
||||
SIZE_RE = re.compile(r"([0-9]+[eE][-+][0-9]+|\d*\.?\d+)"
|
||||
"\s*(\w+)?(\s*\(\s*(\d+)\s+bytes\s*\))?",
|
||||
r"\s*(\w+)?(\s*\(\s*(\d+)\s+bytes\s*\))?",
|
||||
re.I)
|
||||
|
||||
def __init__(self, cmd_output=None, format='human'):
|
||||
|
@ -39,6 +39,7 @@ def _constant_time_compare(first, second):
|
||||
result |= ord(x) ^ ord(y)
|
||||
return result == 0
|
||||
|
||||
|
||||
try:
|
||||
constant_time_compare = hmac.compare_digest
|
||||
except AttributeError:
|
||||
|
@ -137,6 +137,7 @@ class ImageUtilsRawTestCase(test_base.BaseTestCase):
|
||||
image_info = imageutils.QemuImgInfo(example_output)
|
||||
self._base_validation(image_info)
|
||||
|
||||
|
||||
ImageUtilsRawTestCase.generate_scenarios()
|
||||
|
||||
|
||||
@ -203,6 +204,7 @@ class ImageUtilsQemuTestCase(ImageUtilsRawTestCase):
|
||||
if self.encrypted is not None:
|
||||
self.assertEqual(image_info.encrypted, self.encrypted)
|
||||
|
||||
|
||||
ImageUtilsQemuTestCase.generate_scenarios()
|
||||
|
||||
|
||||
|
@ -291,6 +291,7 @@ class StringToBytesTest(test_base.BaseTestCase):
|
||||
else:
|
||||
self.assertAlmostEqual(actual, expected)
|
||||
|
||||
|
||||
StringToBytesTest.generate_scenarios()
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||
|
||||
eventlet>=0.18.2,!=0.18.3,!=0.20.1,!=0.21.0,!=0.23.0 # MIT
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
|
@ -37,7 +37,7 @@ print('payload has %d bytes' % len(input_str))
|
||||
for pattern in strutils._SANITIZE_PATTERNS_2['admin_pass']:
|
||||
print('\ntesting %s' % pattern.pattern)
|
||||
t = timeit.Timer(
|
||||
"re.sub(pattern, r'\g<1>***\g<2>', payload)",
|
||||
r"re.sub(pattern, r'\g<1>***\g<2>', payload)",
|
||||
"""
|
||||
import re
|
||||
payload = '''%s'''
|
||||
|
3
tox.ini
3
tox.ini
@ -37,7 +37,8 @@ commands = bandit -r oslo_utils -x tests -n5
|
||||
|
||||
[flake8]
|
||||
# E731 skipped as assign a lambda expression
|
||||
ignore = E123,E731,H405
|
||||
# W504 line break after binary operator
|
||||
ignore = E123,E731,H405,W504
|
||||
show-source = True
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user