classification
Title: Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess
Type: Stage: resolved
Components: asyncio Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, miss-islington, sbstp, yselivanov
Priority: normal Keywords: patch

Created on 2019-04-21 01:04 by sbstp, last changed 2019-05-28 13:06 by asvetlov. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13586 merged sbstp, 2019-05-26 19:16
Messages (4)
msg340593 - (view) Author: Simon Bernier St-Pierre (sbstp) * Date: 2019-04-21 01:04
I had trouble figuring out how to simply inherit stdin, stdout, or stderr in the asyncio.create_subprocess_exec / asyncio.subprocess_exec docs. My experiments show that passing either None or `sys.std*` works but the way the docs are written make it hard to figure that out in my opinion.

> stdout: either a file-like object representing the pipe to be connected to the subprocess’s standard output stream using connect_read_pipe(), or the subprocess.PIPE constant (default). By default a new pipe will be created and connected.

I would add a mention that using None makes the subprocess inherit the file descriptor.
msg340594 - (view) Author: Simon Bernier St-Pierre (sbstp) * Date: 2019-04-21 01:27
Could be cool to also mention that `encoding` / `errors` does not work yet. https://bugs.python.org/issue31087
msg343542 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2019-05-26 10:09
Pull Request is welcome!
msg343713 - (view) Author: miss-islington (miss-islington) Date: 2019-05-27 23:51
New changeset f0d4c64019ecf8a5f362aa5a478786241613e5c3 by Miss Islington (bot) (sbstp) in branch 'master':
bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec (GH-13586)
https://github.com/python/cpython/commit/f0d4c64019ecf8a5f362aa5a478786241613e5c3
History
Date User Action Args
2019-06-02 11:14:24asvetlovlinkissue31087 superseder
2019-05-28 13:06:47asvetlovsetresolution: fixed
versions: - Python 3.5, Python 3.6, Python 3.7, Python 3.9
2019-05-28 00:22:48sbstpsetstatus: open -> closed
stage: patch review -> resolved
2019-05-27 23:51:21miss-islingtonsetnosy: + miss-islington
messages: + msg343713
2019-05-26 19:16:26sbstpsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13493
2019-05-26 10:09:29asvetlovsetmessages: + msg343542
2019-04-21 01:27:37sbstpsetmessages: + msg340594
2019-04-21 01:04:45sbstpcreate