bpo-35918: Remove broken has_key method and add test (#11819)
This commit is contained in:
parent
522346d792
commit
a31f4cc881
|
@ -1135,7 +1135,7 @@ class ListProxy(BaseListProxy):
|
||||||
|
|
||||||
DictProxy = MakeProxyType('DictProxy', (
|
DictProxy = MakeProxyType('DictProxy', (
|
||||||
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
|
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
|
||||||
'__setitem__', 'clear', 'copy', 'get', 'has_key', 'items',
|
'__setitem__', 'clear', 'copy', 'get', 'items',
|
||||||
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
|
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
|
||||||
))
|
))
|
||||||
DictProxy._method_to_typeid_ = {
|
DictProxy._method_to_typeid_ = {
|
||||||
|
|
|
@ -4897,8 +4897,6 @@ class TestSyncManagerTypes(unittest.TestCase):
|
||||||
assert len(obj) == 1
|
assert len(obj) == 1
|
||||||
assert obj['foo'] == 5
|
assert obj['foo'] == 5
|
||||||
assert obj.get('foo') == 5
|
assert obj.get('foo') == 5
|
||||||
# TODO: fix https://bugs.python.org/issue35918
|
|
||||||
# assert obj.has_key('foo')
|
|
||||||
assert list(obj.items()) == [('foo', 5)]
|
assert list(obj.items()) == [('foo', 5)]
|
||||||
assert list(obj.keys()) == ['foo']
|
assert list(obj.keys()) == ['foo']
|
||||||
assert list(obj.values()) == [5]
|
assert list(obj.values()) == [5]
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Removed broken ``has_key`` method from
|
||||||
|
multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.
|
Loading…
Reference in New Issue