diff options
author | Rémi Lapeyre <remi.lapeyre@henki.fr> | 2019-02-12 00:37:24 (GMT) |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-12 00:37:24 (GMT) |
commit | a31f4cc881992e84d351957bd9ac1a92f882fa39 (patch) | |
tree | 6ca6ff8b6f6606535170a767467937f1ac46512a | |
parent | 522346d792d9013140a3f4ad3534ac10f38d9085 (diff) | |
download | cpython-a31f4cc881992e84d351957bd9ac1a92f882fa39.zip cpython-a31f4cc881992e84d351957bd9ac1a92f882fa39.tar.gz cpython-a31f4cc881992e84d351957bd9ac1a92f882fa39.tar.bz2 |
bpo-35918: Remove broken has_key method and add test (#11819)
-rw-r--r-- | Lib/multiprocessing/managers.py | 2 | ||||
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-02-11-16-23-10.bpo-35918.oGDlpT.rst | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index dbed993..4ae8ddc 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -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_ = { diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index d93303b..81db2c9 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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 index 0000000..0fcce3e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-02-11-16-23-10.bpo-35918.oGDlpT.rst @@ -0,0 +1,2 @@ +Removed broken ``has_key`` method from +multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre. |