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 sambayer
Recipients sambayer
Date 2019-01-17.15:22:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547738568.37.0.865745194211.issue35762@roundup.psfhosted.org>
In-reply-to
Content
This bug is probably related to issue 24560.

This:

>>> import subprocess, fcntl, os
>>>> p = subprocess.Popen(["python", "-c", 'import time; time.sleep(5)'], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines= True)
>>> fcntl.fcntl(p.stderr.fileno(), fcntl.F_SETFL, os.O_NONBLOCK | fcntl.fcntl(p.stderr.fileno(), fcntl.F_GETFL))
>>> p.stderr.read()

causes this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 321, in decode
    data = self.buffer + input
TypeError: can't concat NoneType to bytes

I'm assuming the problem is that the underlying unbuffered stream returns None and the incremental byte decoder that's induced by universal_newlines = True isn't expecting it.
History
Date User Action Args
2019-01-17 15:22:51sambayersetrecipients: + sambayer
2019-01-17 15:22:48sambayersetmessageid: <1547738568.37.0.865745194211.issue35762@roundup.psfhosted.org>
2019-01-17 15:22:48sambayerlinkissue35762 messages
2019-01-17 15:22:48sambayercreate