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: asyncio.docs : create_subprocess_exec example does not work on windows
Type: Stage:
Components: Documentation Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: ajaborsk, docs@python, gvanrossum, python-dev, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2014-03-21 10:54 by ajaborsk, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
streamreader_limit.patch vstinner, 2014-03-21 11:09 review
asyncio_subprocess.patch vstinner, 2014-03-21 11:11 review
Messages (8)
msg214341 - (view) Author: Alexandre JABORSKA (ajaborsk) Date: 2014-03-21 10:54
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.
msg214342 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-21 10:56
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
msg214344 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-21 11:08
Oh, the limit parameter StreamReader is not documented! Here is a patch to document it.
msg214345 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-21 11:11
> 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".
msg214355 - (view) Author: Alexandre JABORSKA (ajaborsk) Date: 2014-03-21 13:08
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).
msg214383 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-21 16:16
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
msg214790 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-25 08:40
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
msg214791 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-25 08:41
I reorganized the doc. Thanks for the report.
History
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65205
2014-03-25 08:41:17vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg214791
2014-03-25 08:40:49python-devsetmessages: + msg214790
2014-03-21 16:16:21python-devsetmessages: + msg214383
2014-03-21 13:08:44ajaborsksetmessages: + msg214355
2014-03-21 11:11:33vstinnersetfiles: + asyncio_subprocess.patch

messages: + msg214345
2014-03-21 11:09:03vstinnersetfiles: + streamreader_limit.patch
keywords: + patch
2014-03-21 11:08:57vstinnersetnosy: + gvanrossum, yselivanov, vstinner
messages: + msg214344
2014-03-21 10:56:49python-devsetnosy: + python-dev
messages: + msg214342
2014-03-21 10:54:02ajaborskcreate