Author akira
Recipients akira, gregory.p.smith, jwilk, martin.panter, raylu
Date 2014-05-02.04:37:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
yes, line_buffering=(bufsize == 1) is necessary to support the current 
Python io implementation or if C implementation is fixed to avoid 
buffer.flush() on every write with write_through=True -- otherwise
bufsize is not respected in text mode (it would always mean bufsize=0). 

Note: the current patch for issue #21396 (making C and Python io do the 
same thing) may break subprocess code with universal_newlines=True that 
expects (incorrectly) bufsize=0 by default -- as test_universal_newlines
had (enabling universal_newlines shouldn't switch from bufsize=-1 to 
bufsize=0). <-- XXX backward compatibility issue!

> Perhaps you can avoid the 10 s deadlock timeout and threading in your 
> test by closing the underlying input pipe file descriptor (or raw file 
> object), without flushing it.

It is a good idea. There could be portability issues with the test: it 
relies on the fact that os.close doesn't flush already buffered data -- I 
don't know whether os.close causes flush on Windows (it doesn't on POSIX 
[1]: the data shall be discarded).


I've uploaded a new patch with the updated tests. Please, review.
Date User Action Args
2014-05-02 04:38:01akirasetrecipients: + akira, gregory.p.smith, jwilk, martin.panter, raylu
2014-05-02 04:38:01akirasetmessageid: <>
2014-05-02 04:38:01akiralinkissue21332 messages
2014-05-02 04:38:00akiracreate