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: I02169e2f5bba669182d41a25bef1057306f74be8
This commit is contained in:
parent
4f0a2eac5e
commit
82bf693bdf
|
@ -23,14 +23,11 @@ eventlet==0.18.2
|
|||
extras==1.0.0
|
||||
fasteners==0.7.0
|
||||
fixtures==3.0.0
|
||||
flake8-import-order==0.12
|
||||
flake8==2.6.2
|
||||
future==0.16.0
|
||||
futurist==1.2.0
|
||||
gitdb==0.6.4
|
||||
GitPython==1.0.1
|
||||
greenlet==0.4.10
|
||||
hacking==1.1.0
|
||||
httplib2==0.9.1
|
||||
imagesize==0.7.1
|
||||
iso8601==0.1.11
|
||||
|
@ -93,7 +90,6 @@ Paste==2.0.2
|
|||
PasteDeploy==1.5.0
|
||||
pbr==4.0.0
|
||||
pecan==1.3.2
|
||||
pep8==1.5.7
|
||||
pika-pool==0.1.3
|
||||
pika==0.10.0
|
||||
positional==1.2.1
|
||||
|
@ -102,7 +98,6 @@ psutil==3.2.2
|
|||
pycadf==1.1.0
|
||||
pycodestyle==2.4.0
|
||||
pycparser==2.18
|
||||
pyflakes==0.8.1
|
||||
Pygments==2.2.0
|
||||
pyinotify==0.9.6
|
||||
pylint==2.2.0
|
||||
|
|
|
@ -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.
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
mock>=3.0.0 # BSD
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -67,6 +67,11 @@ builtins = _
|
|||
# H106: Don't put vim configuration in source files
|
||||
# H203: Use assertIs(Not)None to check for None
|
||||
enable-extensions=H106,H203
|
||||
# E123 closing bracket does not match indentation of opening bracket's line
|
||||
# E402 module level import not at top of file
|
||||
# W503 line break before binary operator
|
||||
# W504 line break after binary operator
|
||||
ignore = E123,E402,W503,W504
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
||||
[hacking]
|
||||
|
|
|
@ -43,6 +43,7 @@ def add_command_parsers(subparsers):
|
|||
parser.set_defaults(func=do_db_sync)
|
||||
parser.add_argument('version', nargs='?')
|
||||
|
||||
|
||||
command_opt = cfg.SubCommandOpt('command',
|
||||
title='Commands',
|
||||
help='Show available commands.',
|
||||
|
|
|
@ -50,5 +50,6 @@ def main():
|
|||
return upgradecheck.main(
|
||||
cfg.CONF, project='tricircle', upgrade_command=Checks())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
|
@ -53,5 +53,6 @@ def main():
|
|||
|
||||
xservice.wait()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -90,7 +90,7 @@ class TricircleException(Exception):
|
|||
def _should_format(self):
|
||||
|
||||
if self.kwargs['message'] is None and '%(message)' in self.message:
|
||||
LOG.error('\%(message)s in message '
|
||||
LOG.error(r'\%(message)s in message '
|
||||
'but init parameter is None')
|
||||
|
||||
return self.kwargs['message'] is None or '%(message)' in self.message
|
||||
|
|
|
@ -26,6 +26,7 @@ class Mapping(object):
|
|||
for key, value in six.iteritems(mapping):
|
||||
self.reverse_mapping[value] = key
|
||||
|
||||
|
||||
_SINGLETON_MAPPING = Mapping({
|
||||
ATTR_NOT_SPECIFIED: "@@**ATTR_NOT_SPECIFIED**@@",
|
||||
})
|
||||
|
|
|
@ -482,7 +482,7 @@ class AsyncJobControllerTest(base.TestCase):
|
|||
|
||||
# test marker and limit
|
||||
limit = 2
|
||||
pt = '/v1.0/jobs\?limit=\w+&marker=([\w-]+)'
|
||||
pt = r'/v1.0/jobs\?limit=\w+&marker=([\w-]+)'
|
||||
job_paginate_filter = {'status': 'new', 'limit': limit}
|
||||
res = self.controller.get_all(**job_paginate_filter)
|
||||
while 'jobs_links' in res:
|
||||
|
|
|
@ -1530,8 +1530,6 @@ class PluginTest(unittest.TestCase,
|
|||
'id': b_port_id,
|
||||
'name': b_port_id,
|
||||
'description': 'old_bottom_description',
|
||||
'extra_dhcp_opts': [],
|
||||
'device_owner': device_onwer,
|
||||
'security_groups': [],
|
||||
'device_id': '68f46ee4-d66a-4c39-bb34-ac2e5eb85470',
|
||||
'admin_state_up': True,
|
||||
|
|
|
@ -299,8 +299,6 @@ class PluginTest(unittest.TestCase):
|
|||
'id': t_port_id,
|
||||
'name': t_port_id,
|
||||
'description': 'old_bottom_description',
|
||||
'extra_dhcp_opts': [],
|
||||
'device_owner': device_onwer,
|
||||
'security_groups': [],
|
||||
'device_id': '68f46ee4-d66a-4c39-bb34-ac2e5eb85470',
|
||||
'admin_state_up': True,
|
||||
|
|
|
@ -299,8 +299,6 @@ class PluginTest(unittest.TestCase):
|
|||
'id': t_port_id,
|
||||
'name': t_port_id,
|
||||
'description': 'old_bottom_description',
|
||||
'extra_dhcp_opts': [],
|
||||
'device_owner': device_onwer,
|
||||
'security_groups': [],
|
||||
'device_id': '68f46ee4-d66a-4c39-bb34-ac2e5eb85470',
|
||||
'admin_state_up': True,
|
||||
|
|
|
@ -621,7 +621,7 @@ class FakeClient(object):
|
|||
return None
|
||||
|
||||
def delete_resources(self, _type, ctx, _id):
|
||||
if _type is 'policy':
|
||||
if _type == 'policy':
|
||||
_type = 'qos_policy'
|
||||
index = -1
|
||||
res_list = self._res_map[self.region_name][_type]
|
||||
|
|
|
@ -624,9 +624,9 @@ class XManagerTest(unittest.TestCase):
|
|||
'net2_pod2_inf': '10.0.2.3',
|
||||
'net3_pod1_inf': '10.0.3.5',
|
||||
'net3_pod2_inf': '10.0.3.6'}
|
||||
get_gw_map = lambda n_idx, p_idx: gw_map[
|
||||
get_gw_map = lambda n_idx, p_idx: gw_map[ # noqa: E731
|
||||
'net%d_pod%d_gw' % (n_idx, p_idx)]
|
||||
get_inf_map = lambda n_idx, p_idx: inf_map[
|
||||
get_inf_map = lambda n_idx, p_idx: inf_map[ # noqa: E731
|
||||
'net%d_pod%d_inf' % (n_idx, p_idx)]
|
||||
bridge_infos = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue