[issue4996] io.TextIOWrapper calls buffer.read1()
STINNER Victor
report at bugs.python.org
Mon Jan 19 18:59:42 CET 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Short example to reproduce the problem:
---
import io, os
fd = os.open("/etc/issue", os.O_RDONLY)
raw = open(fd, "rb", buffering=0)
text = io.TextIOWrapper(raw, line_buffering=False)
print(text.read(1))
---
Traceback (most recent call last):
File "x.py", line 6, in <module>
print(text.read(1))
File "/home/SHARE/SVN/py3k/Lib/io.py", line 1739, in read
eof = not self._read_chunk()
File "/home/SHARE/SVN/py3k/Lib/io.py", line 1565, in _read_chunk
input_chunk = self.buffer.read1(self._CHUNK_SIZE)
AttributeError: 'FileIO' object has no attribute 'read1'
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4996>
_______________________________________
More information about the Python-bugs-list
mailing list