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 anacrolix
Recipients anacrolix
Date 2012-01-25.05:13:46
SpamBayes Score 3.1318115e-11
Marked as misclassified No
Message-id <>
_io._IOBase.readline doesn't seem to like returning None, which occurs when it's unbuffered and nonblocking. (Modules/_io/fileio.c:745 in trunk). Can this be handled some other way?

$ python3.3
Python 3.3.0a0 (default:fb0f4fe8123e+, Jan 24 2012, 11:21:36) 
[GCC 4.6.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, io
>>> r, w = os.pipe2(os.O_NONBLOCK)
>>> f =, 'rb', 0)
>>> f.readline()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: read() should have returned a bytes object, not 'NoneType'
Date User Action Args
2012-01-25 05:13:48anacrolixsetrecipients: + anacrolix
2012-01-25 05:13:48anacrolixsetmessageid: <>
2012-01-25 05:13:47anacrolixlinkissue13858 messages
2012-01-25 05:13:46anacrolixcreate