Eryk Sun <eryk...@gmail.com> added the comment:
> Buffering is necessary for implementing the universal_newlines Why is that? I can see that it requires newline state tracking, and the allowance to make two read(fd, &c, 1) system calls for a single read(1) method call, in case a "\n" has to be ignored. testproc-unbuffered.py runs to completion in 3.11 if the following statement that changes the text wrapper's chunk size is added right after creating the Popen() instance: if sys.version_info[0] > 2: process.stdout._CHUNK_SIZE = 1 The initial chunk size for a text wrapper is hard coded as 8192 bytes. For some reason the constructor has no parameter for it. ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41222> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com