py3: fix recursion issue under py37
Add tox target and resolve issue with infinite recursion in ExtraProperties class by directly using methods on the dict class. Closes-Bug: 1800601 Change-Id: Ie98c4287c8bd1c364655adb99c7a88d1d451496e
This commit is contained in:
parent
0b13db85bb
commit
43587fb93d
@ -300,9 +300,9 @@ class ExtraProperties(collections.MutableMapping, dict):
|
|||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
if isinstance(other, ExtraProperties):
|
if isinstance(other, ExtraProperties):
|
||||||
return dict(self).__eq__(dict(other))
|
return dict.__eq__(self, dict(other))
|
||||||
elif isinstance(other, dict):
|
elif isinstance(other, dict):
|
||||||
return dict(self).__eq__(other)
|
return dict.__eq__(self, other)
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -310,10 +310,10 @@ class ExtraProperties(collections.MutableMapping, dict):
|
|||||||
return not self.__eq__(other)
|
return not self.__eq__(other)
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return dict(self).__len__()
|
return dict.__len__(self)
|
||||||
|
|
||||||
def keys(self):
|
def keys(self):
|
||||||
return dict(self).keys()
|
return dict.keys(self)
|
||||||
|
|
||||||
|
|
||||||
class ImageMembership(object):
|
class ImageMembership(object):
|
||||||
|
14
tox.ini
14
tox.ini
@ -34,6 +34,10 @@ commands = ostestr --slowest {posargs}
|
|||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
commands = ostestr --slowest {posargs}
|
commands = ostestr --slowest {posargs}
|
||||||
|
|
||||||
|
[testenv:py37]
|
||||||
|
basepython = python3.7
|
||||||
|
commands = ostestr --slowest {posargs}
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
setenv =
|
setenv =
|
||||||
TEST_PATH = ./glance/tests/functional
|
TEST_PATH = ./glance/tests/functional
|
||||||
@ -51,6 +55,16 @@ whitelist_externals =
|
|||||||
commands =
|
commands =
|
||||||
stestr run --blacklist-file ./broken-functional-py35-ssl-tests.txt {posargs}
|
stestr run --blacklist-file ./broken-functional-py35-ssl-tests.txt {posargs}
|
||||||
|
|
||||||
|
[testenv:functional-py37]
|
||||||
|
basepython = python3.7
|
||||||
|
setenv =
|
||||||
|
TEST_PATH = ./glance/tests/functional
|
||||||
|
ignore_errors = True
|
||||||
|
whitelist_externals =
|
||||||
|
bash
|
||||||
|
commands =
|
||||||
|
stestr run --blacklist-file ./broken-functional-py35-ssl-tests.txt {posargs}
|
||||||
|
|
||||||
[testenv:broken-py35-ssl-tests]
|
[testenv:broken-py35-ssl-tests]
|
||||||
# NOTE(rosmaita): these tests were being skipped due to bug #1482633, but we
|
# NOTE(rosmaita): these tests were being skipped due to bug #1482633, but we
|
||||||
# want it to be obvious that Glance is affected by the eventlet ssl-handshake
|
# want it to be obvious that Glance is affected by the eventlet ssl-handshake
|
||||||
|
Loading…
Reference in New Issue
Block a user