Issue 21006: asyncio.docs : create_subprocess_exec example does not work on windows (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/65205

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:00 admin set github: 65205
2014-03-25 08:41:17 vstinner set status: open -> closedresolution: fixedmessages: +
2014-03-25 08:40:49 python-dev set messages: +
2014-03-21 16:16:21 python-dev set messages: +
2014-03-21 13:08:44 ajaborsk set messages: +
2014-03-21 11:11:33 vstinner set files: + asyncio_subprocess.patchmessages: +
2014-03-21 11:09:03 vstinner set files: + streamreader_limit.patchkeywords: + patch
2014-03-21 11:08:57 vstinner set nosy: + gvanrossum, yselivanov, vstinnermessages: +
2014-03-21 10:56:49 python-dev set nosy: + python-devmessages: +
2014-03-21 10:54:02 ajaborsk create