Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit 6cfc948b authored by Manuel Jacob's avatar Manuel Jacob
Browse files

procutil: explain better why line buffering is not possible

The sentence “On Python 3, buffered binary streams can't be set line-buffered.”
was imprecise, as all streams are just Python classes and we can implement our
own (which we did).
parent a59aab6078eb
......@@ -99,9 +99,10 @@ if pycompat.iswindows:
# buffering.
if isatty(stdout):
if pycompat.ispy3 or pycompat.iswindows:
# On Python 3, buffered binary streams can't be set line-buffered.
# On Python 2, Windows doesn't support line buffering.
# Therefore we have a wrapper that implements line buffering.
# Python 3 implements its own I/O streams.
# The standard library doesn't offer line-buffered binary streams.
# Python 2 uses the I/O streams provided by the C library.
# The Windows C runtime library doesn't support line buffering.
stdout = make_line_buffered(stdout)
stdout = os.fdopen(stdout.fileno(), 'wb', 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment