[New-bugs-announce] [issue30488] Documentation for subprocess.STDOUT needs clarification
report at bugs.python.org
Fri May 26 13:42:41 EDT 2017
New submission from Max:
The documentation states that subprocess.STDOUT is:
Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output.
However, when Popen is called with stdout=None, stderr=subprocess.STDOUT, stderr is not redirected to stdout and continues to be sent to stderr.
To reproduce the problem:
$ python >/dev/null -c 'import subprocess;\
and observe the error message appearing on the console (assuming /404 directory does not exist).
This was reported on SO 5 years ago: https://stackoverflow.com/questions/11495783/redirect-subprocess-stderr-to-stdout.
The SO attributed this to a documentation issue, but arguably it should be considered a bug because there seems to be no reason to make subprocess.STDOUT unusable in this very common use case.
components: Interpreter Core
title: Documentation for subprocess.STDOUT needs clarification
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce