]> granicus.if.org Git - python/commitdiff
bpo-35918: Remove broken has_key method and add test (#11819)
authorRémi Lapeyre <remi.lapeyre@henki.fr>
Tue, 12 Feb 2019 00:37:24 +0000 (01:37 +0100)
committerGiampaolo Rodola <g.rodola@gmail.com>
Tue, 12 Feb 2019 00:37:24 +0000 (16:37 -0800)
Lib/multiprocessing/managers.py
Lib/test/_test_multiprocessing.py
Misc/NEWS.d/next/Library/2019-02-11-16-23-10.bpo-35918.oGDlpT.rst [new file with mode: 0644]

index dbed993a38d65af89dc086a631bb179c49e53e56..4ae8ddc77018648d69271ce2cedddd252e0e01a0 100644 (file)
@@ -1135,7 +1135,7 @@ class ListProxy(BaseListProxy):
 
 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_ = {
index d93303bb9ccacf26a95fb92e25ee217bb58d2de2..81db2c9870582bb4fb412e491224b2db2b4e68d2 100644 (file)
@@ -4897,8 +4897,6 @@ class TestSyncManagerTypes(unittest.TestCase):
         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]
diff --git a/Misc/NEWS.d/next/Library/2019-02-11-16-23-10.bpo-35918.oGDlpT.rst b/Misc/NEWS.d/next/Library/2019-02-11-16-23-10.bpo-35918.oGDlpT.rst
new file mode 100644 (file)
index 0000000..0fcce3e
--- /dev/null
@@ -0,0 +1,2 @@
+Removed broken ``has_key`` method from
+multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.