[issue4996] io.TextIOWrapper calls buffer.read1()

2009-03-04 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This has been fixed in io-c branch merge. (r70152) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This has been fixed in io-c branch merge. r70152 Amazing, io-c is faster but also fixes many bugs! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-02-28 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: In the io-c branch, read1() is now a member of BufferedIOBase. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996 ___

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread HiroakiKawai
New submission from HiroakiKawai ka...@apache.org: The documentation says io.TextIOWrapper wraps io.BufferedIOBase raw stream. In the code, io.TextIOWrapper.read(), io.TextIOWrapper._read_chunk() calls buffer.read1() which seems expecting buffer to be an instance of io.BufferedReader. I'm not

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed, read1() is not documented as a standard method of either IOBase, RawIOBase or BufferedIOBase. I suggest that it becomes a standard method of IOBase, with a default implementation simply calling read(n). It also means unbuffered stdio as

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: IOBase doesn't even define read(), though! I think we should make it part of BufferIOBase. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996 ___ ___

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
STINNER Victor victor.stin...@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

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: On Mon, Jan 19, 2009 at 11:59 AM, STINNER Victor rep...@bugs.python.org wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Short example to reproduce the problem: --- import io, os fd = os.open(/etc/issue,

[issue4996] io.TextIOWrapper calls buffer.read1()

2009-01-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't understand the motivation of having two different methods for raw streams: read1() and read(). I would prefer to have only a method read() (because read is the most common name, whereas read1() is only used on Python3),