Fix py27 tests
The py27 fails due to incompatible requirements, invoking the commands manually in the py27 environment locally shows: raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (pbr 0.11.0 (/home/aj/Software/vcs/OpenStack/openstack-dev/heat-cfnclient/.tox/py27/lib/python2.7/site-packages), Requirement.parse('pbr>=1.6'), set(['python-keystoneclient', 'stevedore'])) Fixed with syncing pbr version in requirements.txt with global-requirements. Once this was fixed, an import of oslo.config failed, fixed with changing it to oslo_config. Also updated hacking to never version, since old version requires incompatible pbr. Blacklist H104, H405 since code does not confirm to it, fix E265 in exception.py (add missing space), fix F402 in client.py (rename _ which shadows) Change-Id: Ib06f2b0c4d66b7f04d30b324f3214a9b1011011a
This commit is contained in:
parent
34f85c2266
commit
3b310d61fb
|
@ -64,7 +64,7 @@ def handle_redirects(func):
|
|||
|
||||
@functools.wraps(func)
|
||||
def wrapped(self, method, url, body, headers):
|
||||
for _ in xrange(MAX_REDIRECTS):
|
||||
for _dum in xrange(MAX_REDIRECTS):
|
||||
try:
|
||||
return func(self, method, url, body, headers)
|
||||
except exception.RedirectException as redirect:
|
||||
|
|
|
@ -122,7 +122,7 @@ class Forbidden(OpenstackException):
|
|||
message = _("You are not authorized to complete this action.")
|
||||
|
||||
|
||||
#NOTE(bcwaldon): here for backwards-compatability, need to deprecate.
|
||||
# NOTE(bcwaldon): here for backwards-compatability, need to deprecate.
|
||||
class NotAuthorized(Forbidden):
|
||||
message = _("You are not authorized to complete this action.")
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import os
|
|||
import sys
|
||||
import traceback
|
||||
|
||||
from oslo.config import cfg
|
||||
from oslo_config import cfg
|
||||
|
||||
from heat_cfnclient.openstack.common.gettextutils import _ # noqa
|
||||
from heat_cfnclient.openstack.common import importutils
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pbr>=0.6,!=0.7,<1.0
|
||||
pbr>=1.6
|
||||
PyCrypto>=2.1.0
|
||||
boto>=2.4.0
|
||||
eventlet>=0.15.2
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
hacking>=0.8.0,<0.9
|
||||
hacking>=0.10.2,<0.11
|
||||
coverage>=3.6
|
||||
discover
|
||||
mox>=0.5.3
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -27,12 +27,14 @@ commands =
|
|||
|
||||
[flake8]
|
||||
# F841 local variable 'json_template' is assigned to but never used
|
||||
# H104 File contains nothing but comments
|
||||
# H201 no 'except:' at least use 'except Exception:'
|
||||
# H233 Python 3.x
|
||||
# H302 import only modules.'bla..' does not import a module
|
||||
# H306 imports not in alphabetical order
|
||||
# H404 multi line docstring should start with a summary
|
||||
ignore = F841,H201,H233,H302,H306,H404
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
ignore = F841,H104,H201,H233,H302,H306,H404,H405
|
||||
show-source = true
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build
|
||||
|
|
Loading…
Reference in New Issue