Skip to content

Commit a31f4cc

Browse files
Rémi Lapeyregiampaolo
authored andcommitted
bpo-35918: Remove broken has_key method and add test (python#11819)
1 parent 522346d commit a31f4cc

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/multiprocessing/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ def __imul__(self, value):
11351135

11361136
DictProxy = MakeProxyType('DictProxy', (
11371137
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
1138-
'__setitem__', 'clear', 'copy', 'get', 'has_key', 'items',
1138+
'__setitem__', 'clear', 'copy', 'get', 'items',
11391139
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
11401140
))
11411141
DictProxy._method_to_typeid_ = {

Lib/test/_test_multiprocessing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,8 +4897,6 @@ def _test_dict(cls, obj):
48974897
assert len(obj) == 1
48984898
assert obj['foo'] == 5
48994899
assert obj.get('foo') == 5
4900-
# TODO: fix https://bugs.python.org/issue35918
4901-
# assert obj.has_key('foo')
49024900
assert list(obj.items()) == [('foo', 5)]
49034901
assert list(obj.keys()) == ['foo']
49044902
assert list(obj.values()) == [5]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Removed broken ``has_key`` method from
2+
multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.

0 commit comments

Comments
 (0)