This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: multiprocessing's SyncManager.dict.has_key() method is broken
Type: Stage: resolved
Components: Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: davin, giampaolo.rodola, jnoller, pitrou, remi.lapeyre, sbt
Priority: normal Keywords: patch, patch, patch

Created on 2019-02-06 17:22 by giampaolo.rodola, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11819 merged remi.lapeyre, 2019-02-11 15:24
PR 11819 merged remi.lapeyre, 2019-02-11 15:24
PR 11819 merged remi.lapeyre, 2019-02-11 15:24
PR 11824 merged miss-islington, 2019-02-12 00:37
Messages (6)
msg334959 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2019-02-06 17:22
Related to BPO-35917:

$ ./python 
Python 3.8.0a1+ (heads/master:cd90f6a369, Feb  6 2019, 17:16:10) 
[GCC 7.3.0] on linux
>>> import multiprocessing.managers
>>> m = multiprocessing.managers.SyncManager()
>>> m.start()
>>> d = m.dict()
>>> 'has_key' in dir(d)
True
>>> d.has_key(1)
Traceback (most recent call last):
  File "/home/giampaolo/cpython/Lib/multiprocessing/managers.py", line 271, in serve_client
    fallback_func = self.fallback_mapping[methodname]
KeyError: 'has_key'
msg335222 - (view) Author: Rémi Lapeyre (remi.lapeyre) * Date: 2019-02-11 14:39
Hi @giampaolo.rodola, I will post a PR for this issue.
msg335230 - (view) Author: Rémi Lapeyre (remi.lapeyre) * Date: 2019-02-11 15:25
has_key method has been removed in Python3 so I think we can remove it from the DictProxy as well as nobody should be relying on it anymore.
msg335232 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2019-02-11 16:05
That sounds fine to me.
msg335279 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2019-02-12 00:37
New changeset a31f4cc881992e84d351957bd9ac1a92f882fa39 by Giampaolo Rodola (Rémi Lapeyre) in branch 'master':
bpo-35918: Remove broken has_key method and add test (#11819)
https://github.com/python/cpython/commit/a31f4cc881992e84d351957bd9ac1a92f882fa39
msg335280 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2019-02-12 01:09
New changeset 58f05ce059cc5207320fef27a9fbc0ffdc2b1d1a by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7':
bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)
https://github.com/python/cpython/commit/58f05ce059cc5207320fef27a9fbc0ffdc2b1d1a
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 80099
2019-02-12 17:36:02josh.rsetkeywords: patch, patch, patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-02-12 01:09:29giampaolo.rodolasetmessages: + msg335280
2019-02-12 00:37:51miss-islingtonsetpull_requests: + pull_request11854
2019-02-12 00:37:26giampaolo.rodolasetmessages: + msg335279
2019-02-11 16:05:31pitrousetkeywords: patch, patch, patch

messages: + msg335232
2019-02-11 15:25:52remi.lapeyresetmessages: + msg335230
2019-02-11 15:25:15remi.lapeyresetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request11843
2019-02-11 15:25:06remi.lapeyresetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request11842
2019-02-11 15:24:55remi.lapeyresetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request11841
2019-02-11 14:39:43remi.lapeyresetnosy: + remi.lapeyre
messages: + msg335222
2019-02-06 17:22:15giampaolo.rodolacreate