[issue13322] buffered read() and write() does not raise BlockingIOError
sbt
report at bugs.python.org
Wed Nov 2 16:08:55 CET 2011
New submission from sbt <shibturn at gmail.com>:
According to the the documentation, BufferedReader.read() and BufferedWriter.write() should raise io.BlockingIOError if the file is in non-blocking mode and the operation cannot succeed without blocking.
However, BufferedReader.read() returns None (which is what RawIOBase.read() is documented as doing), and BufferedWriter.write() raises IOError with a message like
raw write() returned invalid length -1 (should have been
between 0 and 5904)
I tested this on Linux with Python 2.6, 2.7 and 3.x.
Attached is a unit test.
----------
files: blockingioerror.py
messages: 146841
nosy: sbt
priority: normal
severity: normal
status: open
title: buffered read() and write() does not raise BlockingIOError
Added file: http://bugs.python.org/file23590/blockingioerror.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13322>
_______________________________________
More information about the Python-bugs-list
mailing list