[issue35762] subprocess.Popen with universal_newlines and nonblocking streams fails with "can't concat NoneType to bytes"
Martin Panter
report at bugs.python.org
Sat Jan 19 02:42:50 EST 2019
Martin Panter <vadmium+py at 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 <report at bugs.python.org>
<https://bugs.python.org/issue35762>
_______________________________________
More information about the Python-bugs-list
mailing list