summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuly Tikhonov <july.tikh@gmail.com>2023-04-26 18:57:19 (GMT)
committerGitHub <noreply@github.com>2023-04-26 18:57:19 (GMT)
commit37e37553b09dba073cfe77d9fb96863b94df2fbc (patch)
treebb379622798bd4ea90a33e4a39d0610f6064207b
parentd45225bd66a8123e4a30314c627f2586293ba532 (diff)
downloadcpython-37e37553b09dba073cfe77d9fb96863b94df2fbc.zip
cpython-37e37553b09dba073cfe77d9fb96863b94df2fbc.tar.gz
cpython-37e37553b09dba073cfe77d9fb96863b94df2fbc.tar.bz2
gh-91441: Clarify the docs of asyncio.loop.subprocess_exec() (#91442)
Clarify the docs of asyncio.loop.subprocess_exec() Clarify the documentation of stdin, stdout and stderr arguments of asyncio.loop.subprocess_exec(). Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
-rw-r--r--Doc/library/asyncio-eventloop.rst17
1 files changed, 8 insertions, 9 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index e3dcd08..e982cc1 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -1438,9 +1438,7 @@ async/await code consider using the high-level
* *stdin* can be any of these:
- * a file-like object representing a pipe to be connected to the
- subprocess's standard input stream using
- :meth:`~loop.connect_write_pipe`
+ * a file-like object
* the :const:`subprocess.PIPE` constant (default) which will create a new
pipe and connect it,
* the value ``None`` which will make the subprocess inherit the file
@@ -1450,9 +1448,7 @@ async/await code consider using the high-level
* *stdout* can be any of these:
- * a file-like object representing a pipe to be connected to the
- subprocess's standard output stream using
- :meth:`~loop.connect_write_pipe`
+ * a file-like object
* the :const:`subprocess.PIPE` constant (default) which will create a new
pipe and connect it,
* the value ``None`` which will make the subprocess inherit the file
@@ -1462,9 +1458,7 @@ async/await code consider using the high-level
* *stderr* can be any of these:
- * a file-like object representing a pipe to be connected to the
- subprocess's standard error stream using
- :meth:`~loop.connect_write_pipe`
+ * a file-like object
* the :const:`subprocess.PIPE` constant (default) which will create a new
pipe and connect it,
* the value ``None`` which will make the subprocess inherit the file
@@ -1483,6 +1477,11 @@ async/await code consider using the high-level
as text. :func:`bytes.decode` can be used to convert the bytes returned
from the stream to text.
+ If a file-like object passed as *stdin*, *stdout* or *stderr* represents a
+ pipe, then the other side of this pipe should be registered with
+ :meth:`~loop.connect_write_pipe` or :meth:`~loop.connect_read_pipe` for use
+ with the event loop.
+
See the constructor of the :class:`subprocess.Popen` class
for documentation on other arguments.