New submission from deltaclock <deltacl...@protonmail.com>:
The manager class of the multiprocessing module doesnt implement __next__ or __iter__ on its dictionary method and relies on using __getitem__. This results in an unexpected functionality of an object that is supposed to act like a dict, and instead of looping over the dictionary keys it loops over its values. The user needs to call dict() on this object in order to loop over it correctly, which is not that obvious. The problem originates from there https://github.com/python/cpython/blob/master/Lib/multiprocessing/managers.py#L1136 Poc link: https://hastebin.com/codoqihowi.py ---------- components: Library (Lib) files: test.py messages: 324813 nosy: deltaclock priority: normal severity: normal status: open title: Incorrect iteration of Manager.dict() method of the multiprocessing module. type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47792/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34610> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com