[issue21006] asyncio.docs : create_subprocess_exec example does not work on windows
New submission from Alexandre JABORSKA: The documentation example (getstatusoutput) does not work on windows because it use the default loop (based on select). The whole asyncio.ProactorEventLoop stuff is not really explained anywhere. Maybe a "How to use asyncio on Windows" could be useful. ---------- assignee: docs@python components: Documentation messages: 214341 nosy: ajaborsk, docs@python priority: normal severity: normal status: open title: asyncio.docs : create_subprocess_exec example does not work on windows versions: Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
Roundup Robot added the comment: New changeset 7cca663a72eb by Victor Stinner in branch 'default': Issue #21006: Fix subprocess example on Windows in asyncio doc http://hg.python.org/cpython/rev/7cca663a72eb ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
STINNER Victor added the comment: Oh, the limit parameter StreamReader is not documented! Here is a patch to document it. ---------- nosy: +gvanrossum, haypo, yselivanov _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
Changes by STINNER Victor <victor.stinner@gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file34544/streamreader_limit.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
STINNER Victor added the comment:
The whole asyncio.ProactorEventLoop stuff is not really explained anywhere. Maybe a "How to use asyncio on Windows" could be useful.
It is explained in the subprocess methods of the event loop. Well, I expected this reaction: the subprocess documentation is currently splitted in two parts (event loop and asyncio.subprocess). IMO all functions related to subprocess must be moved to the subprocess page. Here is a patch to group all subprocess documentation. I added a "Connect pipes" section, mentionned that event loop functions are the "low level API" whereas the asyncio.subprocess is the "high level API". ---------- Added file: http://bugs.python.org/file34545/asyncio_subprocess.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
Alexandre JABORSKA added the comment: I saw the "low level" part with the warning. But what I mean is that I found no clear indication on how to change default loop to allow asyncio.subprocess usage with Windows Python. I guessed : asyncio.set_event_loop(ProactorEventLoop()) but I'm not sure (it works for me). ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
Roundup Robot added the comment: New changeset ab0aa412fca2 by Victor Stinner in branch '3.4': Issue #21006: Fix subprocess example on Windows in asyncio doc http://hg.python.org/cpython/rev/ab0aa412fca2 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
Roundup Robot added the comment: New changeset dd2c7cca5980 by Victor Stinner in branch '3.4': Issue #21006: asyncio doc: reorganize subprocess doc http://hg.python.org/cpython/rev/dd2c7cca5980 New changeset c45b124e9af4 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21006: asyncio doc: reorganize subprocess doc http://hg.python.org/cpython/rev/c45b124e9af4 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
STINNER Victor added the comment: I reorganized the doc. Thanks for the report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21006> _______________________________________
participants (3)
-
Alexandre JABORSKA
-
Roundup Robot
-
STINNER Victor