Message334630
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. |
|
Date |
User |
Action |
Args |
2019-01-31 15:21:54 | steverpalmer | set | recipients:
+ steverpalmer |
2019-01-31 15:21:50 | steverpalmer | set | messageid: <1548948110.23.0.999331035986.issue35869@roundup.psfhosted.org> |
2019-01-31 15:21:50 | steverpalmer | link | issue35869 messages |
2019-01-31 15:21:50 | steverpalmer | create | |
|