mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-13601: always use line-buffering for sys.stderr (GH-17646)
This commit is contained in:
parent
46abfc1416
commit
5b9077134c
5 changed files with 33 additions and 4 deletions
|
@ -1817,7 +1817,7 @@ create_stdio(const PyConfig *config, PyObject* io,
|
|||
write_through = Py_True;
|
||||
else
|
||||
write_through = Py_False;
|
||||
if (isatty && buffered_stdio)
|
||||
if (buffered_stdio && (isatty || fd == fileno(stderr)))
|
||||
line_buffering = Py_True;
|
||||
else
|
||||
line_buffering = Py_False;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue