-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Description
In the documentation of asyncio.loop.subprocess_exec(), in the description of each of stdin, stdout, stderr arguments, there is an item (correspondingly):
* a file-like object representing a pipe to be connected to the
subprocess's standard [input/output/error] stream using
:meth:`~loop.connect_write_pipe`
As far as I understand, only the stdin should be handled by connect_write_pipe(), and the other two are to be handled by connect_read_pipe(). This looks like a copy-paste error.
Also, the wording is misleading, in my opinion. It says that pipe is to be connected to the subprocess’s stdin using connect_write_pipe(). But this in fact conflates two different actions: one side of the pipe is connected to the process’s stdin (and this is done by asyncio+subprocess), while the other should be handled with connect_write_pipe() (and this you should do yourself it you want to make it accessible with asyncio).
Also, it says that a file-like object has to represent a pipe, but in fact I still can use a regular file object. So, some conditional wording should be used, in my opinion.
In fact, I would not even put this kind of clarification in the list… maybe a paragraph after the list of options? I don't know if removing it altogether would be ok.
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status