Browse Source

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: I035eb2f83c289ff994c77b02d5f3c2f9a0d583d8
changes/08/718008/1
Andreas Jaeger 1 year ago
parent
commit
5999d35cb6
  1. 1
      heat-config-ansible/install.d/hook-ansible.py
  2. 1
      heat-config-apply-config/install.d/hook-apply-config.py
  3. 1
      heat-config-docker-cmd/install.d/hook-docker-cmd.py
  4. 1
      heat-config-docker-compose/install.d/hook-docker-compose.py
  5. 1
      heat-config-json-file/install.d/hook-json-file.py
  6. 2
      heat-config-kubelet/install.d/hook-kubelet.py
  7. 1
      heat-config-salt/install.d/hook-salt.py
  8. 1
      heat-config-script/install.d/hook-script.py
  9. 5
      lower-constraints.txt
  10. 2
      test-requirements.txt
  11. 1
      tests/hook-fake-raises.py
  12. 1
      tests/hook-fake.py
  13. 6
      tests/test_heat_config_docker_compose.py

1
heat-config-ansible/install.d/hook-ansible.py

@ -141,5 +141,6 @@ def main(argv=sys.argv):
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
heat-config-apply-config/install.d/hook-apply-config.py

@ -53,5 +53,6 @@ def main(argv=sys.argv):
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
heat-config-docker-cmd/install.d/hook-docker-cmd.py

@ -84,5 +84,6 @@ def main(argv=sys.argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
'\n'.join(apply_stderr),
deploy_status_code), stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
heat-config-docker-compose/install.d/hook-docker-compose.py

@ -124,5 +124,6 @@ def main(argv=sys.argv):
json.dump(build_response(stdout, stderr, subproc.returncode), sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
heat-config-json-file/install.d/hook-json-file.py

@ -49,5 +49,6 @@ def main(argv=sys.argv):
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

2
heat-config-kubelet/install.d/hook-kubelet.py

@ -54,7 +54,7 @@ def id_to_pod_name_part(config_id):
def container_pattern(config_id, container_name):
return '^/k8s_%s\.[0-9a-z]{8}_%s' % (
return r'^/k8s_%s\.[0-9a-z]{8}_%s' % (
container_name, id_to_pod_name_part(config_id))

1
heat-config-salt/install.d/hook-salt.py

@ -124,5 +124,6 @@ def main(argv=sys.argv):
})
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
heat-config-script/install.d/hook-script.py

@ -92,5 +92,6 @@ def main(argv=sys.argv):
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

5
lower-constraints.txt

@ -13,8 +13,6 @@ deprecation==1.0
dogpile.cache==0.6.2
extras==1.0.0
fixtures==3.0.0
flake8==2.5.5
hacking==0.12.0
idna==2.6
iso8601==0.1.11
Jinja2==2.10
@ -25,7 +23,6 @@ jsonschema==2.6.0
keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0
@ -42,12 +39,10 @@ oslo.serialization==2.18.0
oslo.utils==3.33.0
paunch==4.0.0
pbr==2.0.0
pep8==1.5.7
positional==1.2.1
prettytable==0.7.2
pycparser==2.18
pycrypto==2.6
pyflakes==0.8.1
pyOpenSSL==17.1.0
pyparsing==2.1.0
pyperclip==1.5.27

2
test-requirements.txt

@ -4,7 +4,7 @@
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
# Hacking already pins down pep8, pyflakes and flake8
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=3.0,<3.1.0 # Apache-2.0
paunch>=4.0.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
requests-mock>=1.1.0 # Apache-2.0

1
tests/hook-fake-raises.py

@ -37,5 +37,6 @@ def main(argv=sys.argv):
f.flush()
raise OSError("Something bad happened!")
if __name__ == '__main__':
sys.exit(main(sys.argv))

1
tests/hook-fake.py

@ -56,5 +56,6 @@ def main(argv=sys.argv):
f.flush()
json.dump(response, sys.stdout)
if __name__ == '__main__':
sys.exit(main(sys.argv))

6
tests/test_heat_config_docker_compose.py

@ -111,6 +111,6 @@ class HeatConfigDockerComposeORCTest(common.RunScriptTest):
compose_yml = self.docker_compose_dir.join(
'abcdef001/docker-compose.yml')
with open(compose_yml) as f:
self.assertEqual(yaml.safe_dump(
self.data[0].get('config'),
default_flow_style=False), f.read())
self.assertEqual(yaml.safe_dump(
self.data[0].get('config'),
default_flow_style=False), f.read())
Loading…
Cancel
Save