[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-13 Thread Berker Peksag
Berker Peksag added the comment: New changeset 7f580970836b0f6bc9c5db868d95bea81a3e1558 by Berker Peksag in branch 'master': bpo-28647: Update -u documentation after bpo-30404 (GH-3961) https://github.com/python/cpython/commit/7f580970836b0f6bc9c5db868d95bea81a3e1558 -- nosy: +berker

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-11 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +3939 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 77732be801c18013cfbc86e27fcc50194ca22c8e by Serhiy Storchaka in branch 'master': bpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered. (#1667) https://github.com/python/cpython/commit/77732be801c18013cfbc86e27fcc

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there is a need in making redirected stdout line-buffered, a new option can be added in separate issue. -- ___ Python tracker ___ __

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that if output by lines, the patch speeds up the output! Actually the output is fast enough with buffering and without. The only slowdown is exposed when output by characters, but this is uncommon case. And if you output by characters (in case of drawin

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-06-19 Thread STINNER Victor
STINNER Victor added the comment: Hum. It has an huge impact on performances. Would it make sense to have two command line options to choose between unbuffered and line buffered? The C setvbuf() function uses these constants: _IONBF unbuffered _IOLBF line buffered

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Writing separate lines: $ ./python -m timeit -s 'import sys' -s 'with open("setup.py") as f: s = f.readlines()' 'sys.stderr.writelines(s)' 2>/dev/null 200 loops, best of 5: 1.07 msec per loop $ ./python -u -m timeit -s 'import sys' -s 'with open("setup.py")

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-06-19 Thread STINNER Victor
STINNER Victor added the comment: While I hope that users of the -u options expect the slow-down, would it be possible to benchmark it? For example, try to write setup.py content character by character to stdout using -u or not, into a TTY, into a pipe and/or a file. I'm curious if the line b

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-06-19 Thread STINNER Victor
STINNER Victor added the comment: Oh, I like https://github.com/python/cpython/pull/1667/ "If write_through is True, calls to write() are guaranteed not to be buffered: any data written on the TextIOWrapper object is immediately handled to its underlying binary buffer." I didn't know write_t

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-05-24 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +1881 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-05-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Make stdout and stderr truly unbuffered when run with the -u option -> Make stdout and stderr truly unbuffered when using -u option ___ Python tracker