Martin Panter <vadmium...@gmail.com> added the comment:

Yes, universal newlines mode uses the TextIOWrapper class to read the pipe, 
which isn’t really designed for non-blocking mode. This is the same problem 
described by Izbyshev at <https://bugs.python.org/issue13322#msg307763>.

Raising TypeError isn’t ideal. IMO it would be better to raise BlockingIOError, 
which is what basic calls like “os.read” would do, and what 
“BufferedReader.read” is supposed to do according to the documentation. 
(However the documentation and implementation don’t match; that is what Issue 
13322 is about.)

----------
nosy: +martin.panter
type: crash -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35762>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to