[issue32051] Possible issue in multiprocessing doc
New submission from jason <peter.waynechina@gmail.com>: in multiprocessing doc https://docs.python.org/3.6/library/multiprocessing.html under 17.2.2.7.2. Using a remote manager,
from multiprocessing.managers import BaseManager import queue queue = queue.Queue() class QueueManager(BaseManager): pass QueueManager.register('get_queue', callable=lambda:queue) m = QueueManager(address=('', 50000), authkey=b'abracadabra') s = m.get_server() s.serve_forever()
queue is used as both module name and variable name, should this be avoided? ---------- assignee: docs@python components: Documentation messages: 306389 nosy: 1a1a11a, docs@python priority: normal severity: normal status: open title: Possible issue in multiprocessing doc type: enhancement versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Berker Peksag <berker.peksag@gmail.com> added the comment: The example itself works fine, but I agree that it would be better to use a better name. We could replace ``('foo.bar.org', 50000)`` in the following examples with ``('', 50000)`` too. Would you like to send a PR? The documentation file is located at Doc/library/multiprocessing.rst. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: enhancement -> behavior versions: +Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
jason <peter.waynechina@gmail.com> added the comment: Thank you for answering! Yes, I would be very happy to do that, this is going to be my first contribution! :) ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Change by Jason <peter.waynechina@gmail.com>: ---------- keywords: +patch pull_requests: +4401 stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Jason <peter.waynechina@gmail.com> added the comment: Hi Berker, I didn't update "following examples with ``('', 50000)`` too." because this is different than the previous one, this is client connecting to server, so hostname cannot be empty string. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Berker Peksag <berker.peksag@gmail.com> added the comment: New changeset c172fc5031a4035986bef0b2fcef906706d7abf3 by Berker Peksag (Jason Yang) in branch 'master': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469) https://github.com/python/cpython/commit/c172fc5031a4035986bef0b2fcef906706d... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Change by Roundup Robot <devnull@psf.upfronthosting.co.za>: ---------- pull_requests: +4505 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Berker Peksag <berker.peksag@gmail.com> added the comment: New changeset 8a957534f5182022ee8ac2dbaac4b4900dc98159 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469) https://github.com/python/cpython/commit/8a957534f5182022ee8ac2dbaac4b4900dc... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
Berker Peksag <berker.peksag@gmail.com> added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32051> _______________________________________
participants (4)
-
Berker Peksag
-
jason
-
Jason
-
Roundup Robot