Author yann
Recipients yann
Date 2021-05-02.18:46:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
With upcoming 3.10 phasing out 2.7 compatibility I have to find a solution to this, so I'm back digging here.

Even .read(1) on a subprocess pipe causes an underlying buffered read, so working around the problem by a loop of 1-byte reads has to do with, though its usage on file-like object is discouraged.

It looks like one of those would be needed, depending on the expected semantics of `POpen`'s `bufsize` parameter:

* use the provided bufsize for the underlying buffering
* provide a dummy pipe fd through fileno(), feeding it data as long as a read() call leaves data in the underlying buffer (indeed a simple conditional 1-byte read or write to the pipe before returning to caller should provide the correct semantics)
Date User Action Args
2021-05-02 18:46:14yannsetrecipients: + yann
2021-05-02 18:46:13yannsetmessageid: <>
2021-05-02 18:46:13yannlinkissue41222 messages
2021-05-02 18:46:13yanncreate