Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37e3755

Browse files
tifvwillingc
andauthored
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 <[email protected]>
1 parent d45225b commit 37e3755

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,9 +1438,7 @@ async/await code consider using the high-level
14381438

14391439
* *stdin* can be any of these:
14401440

1441-
* a file-like object representing a pipe to be connected to the
1442-
subprocess's standard input stream using
1443-
:meth:`~loop.connect_write_pipe`
1441+
* a file-like object
14441442
* the :const:`subprocess.PIPE` constant (default) which will create a new
14451443
pipe and connect it,
14461444
* the value ``None`` which will make the subprocess inherit the file
@@ -1450,9 +1448,7 @@ async/await code consider using the high-level
14501448

14511449
* *stdout* can be any of these:
14521450

1453-
* a file-like object representing a pipe to be connected to the
1454-
subprocess's standard output stream using
1455-
:meth:`~loop.connect_write_pipe`
1451+
* a file-like object
14561452
* the :const:`subprocess.PIPE` constant (default) which will create a new
14571453
pipe and connect it,
14581454
* the value ``None`` which will make the subprocess inherit the file
@@ -1462,9 +1458,7 @@ async/await code consider using the high-level
14621458

14631459
* *stderr* can be any of these:
14641460

1465-
* a file-like object representing a pipe to be connected to the
1466-
subprocess's standard error stream using
1467-
:meth:`~loop.connect_write_pipe`
1461+
* a file-like object
14681462
* the :const:`subprocess.PIPE` constant (default) which will create a new
14691463
pipe and connect it,
14701464
* the value ``None`` which will make the subprocess inherit the file
@@ -1483,6 +1477,11 @@ async/await code consider using the high-level
14831477
as text. :func:`bytes.decode` can be used to convert the bytes returned
14841478
from the stream to text.
14851479

1480+
If a file-like object passed as *stdin*, *stdout* or *stderr* represents a
1481+
pipe, then the other side of this pipe should be registered with
1482+
:meth:`~loop.connect_write_pipe` or :meth:`~loop.connect_read_pipe` for use
1483+
with the event loop.
1484+
14861485
See the constructor of the :class:`subprocess.Popen` class
14871486
for documentation on other arguments.
14881487

0 commit comments

Comments
 (0)