[New-bugs-announce] [issue21332] subprocess bufsize=1 docs are misleading
raylu
report at bugs.python.org
Wed Apr 23 01:35:45 CEST 2014
New submission from raylu:
https://docs.python.org/3.3/library/subprocess.html says
"bufsize will be supplied as the corresponding argument to the open() function when creating the stdin/stdout/stderr pipe file objects: ... 1 means line buffered"
but it calls io.open with 'wb' and 'rb': http://hg.python.org/cpython/file/c9cb931b20f4/Lib/subprocess.py#l828
This puts the file in binary mode, and https://docs.python.org/3.3/library/functions.html#open says
"1 to select line buffering (only usable in text mode)"
Even with universal_newlines=True, the TextIOWrapper isn't passed line_buffering=True. There's actually no way to get line buffering any more.
----------
components: Library (Lib)
messages: 217044
nosy: raylu
priority: normal
severity: normal
status: open
title: subprocess bufsize=1 docs are misleading
versions: Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21332>
_______________________________________
More information about the New-bugs-announce
mailing list