classification
Title: Make stdout and stderr truly unbuffered when using -u option
Type: enhancement Stage: patch review
Components: Interpreter Core, IO Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, pitrou, serhiy.storchaka, stutzbach
Priority: normal Keywords:

Created on 2017-05-19 15:52 by serhiy.storchaka, last changed 2017-05-24 22:13 by berker.peksag.

Pull Requests
URL Status Linked Edit
PR 1667 open serhiy.storchaka, 2017-05-19 16:02
PR 1655 berker.peksag, 2017-05-24 22:13
Messages (1)
msg293960 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-19 15:52
In Python 2 when run the interpreter with the -u option the stdout and stderr streams are unbuffered. In Python 3 they become just line-buffered. This is because initially there was no way to create unbuffered text streams. But since Python 3.3 TextIOWrapper supports unbuffered output binary stream and accepts the write_through argument which switch off its own buffering.

Proposed patch makes the stdout and stderr streams truly unbuffered when run with the -u option.
History
Date User Action Args
2017-05-24 22:13:46berker.peksagsetpull_requests: + pull_request1881
2017-05-19 21:45:35terry.reedysettitle: Make stdout and stderr truly unbuffered when run with the -u option -> Make stdout and stderr truly unbuffered when using -u option
2017-05-19 16:02:43serhiy.storchakasetpull_requests: + pull_request1762
2017-05-19 15:52:05serhiy.storchakacreate