bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)

(cherry picked from commit a31f4cc881)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
This commit is contained in:
Miss Islington (bot) 2019-02-11 17:09:22 -08:00 committed by Giampaolo Rodola
parent 2259b5af3c
commit 58f05ce059
3 changed files with 3 additions and 3 deletions

View file

@ -1135,7 +1135,7 @@ def __imul__(self, value):
DictProxy = MakeProxyType('DictProxy', (
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
'__setitem__', 'clear', 'copy', 'get', 'has_key', 'items',
'__setitem__', 'clear', 'copy', 'get', 'items',
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
))
DictProxy._method_to_typeid_ = {

View file

@ -4768,8 +4768,6 @@ def _test_dict(cls, obj):
assert len(obj) == 1
assert obj['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.keys()) == ['foo']
assert list(obj.values()) == [5]

View file

@ -0,0 +1,2 @@
Removed broken ``has_key`` method from
multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.