From 5b9077134cd0535f21905d5f5195847526cac99c Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Wed, 1 Jan 2020 23:21:43 +0100 Subject: bpo-13601: always use line-buffering for sys.stderr (GH-17646) --- Python/pylifecycle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 4f05dfc349..94bbbdb560 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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; -- cgit v1.2.1