This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, gregory.p.smith, pitrou, yann
Date 2021-12-22.13:01:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640178115.09.0.996105957875.issue41222@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-12-22 13:01:55eryksunsetrecipients: + eryksun, gregory.p.smith, pitrou, yann
2021-12-22 13:01:55eryksunsetmessageid: <1640178115.09.0.996105957875.issue41222@roundup.psfhosted.org>
2021-12-22 13:01:55eryksunlinkissue41222 messages
2021-12-22 13:01:54eryksuncreate