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 steverpalmer
Recipients steverpalmer
Date 2019-01-31.15:21:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548948110.23.0.999331035986.issue35869@roundup.psfhosted.org>
In-reply-to
Content
class io.BufferedIOBase states "In addition, those methods [read(), readinto() and write()] can raise BlockingIOError if the underlying raw stream is in non-blocking mode and cannot take or give enough data; unlike their RawIOBase counterparts, they will never return None."

However, class.io.BufferedReader (inheriting from io.BufferedIOBase) *does* return None in this case.  Admittedly, io.BufferedReader does says it is overriding the inherited method, but I'm surprised that change in behaviour declared for buffered objects, is reverted to the RarIOBase behaviour on a more specific class.

The attached file (a little long - sorry), simulates a slow non-blocking raw file, which it wraps in a BufferReader to test the behaviour defined in BufferedIOBase.
History
Date User Action Args
2019-01-31 15:21:54steverpalmersetrecipients: + steverpalmer
2019-01-31 15:21:50steverpalmersetmessageid: <1548948110.23.0.999331035986.issue35869@roundup.psfhosted.org>
2019-01-31 15:21:50steverpalmerlinkissue35869 messages
2019-01-31 15:21:50steverpalmercreate