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

2009-03-04 Thread STINNER Victor
STINNER Victor 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 ___

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

2009-03-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: This has been fixed in io-c branch merge. (r70152) -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

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

2009-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: In the io-c branch, read1() is now a member of BufferedIOBase. ___ Python tracker ___ ___ Python-bugs-list

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

2009-01-19 Thread STINNER Victor
STINNER Victor 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), but read() will have to fol

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

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Mon, Jan 19, 2009 at 11:59 AM, STINNER Victor wrote: > > STINNER Victor 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.TextIOW

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

2009-01-19 Thread STINNER Victor
STINNER Victor 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

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

2009-01-19 Thread STINNER Victor
STINNER Victor added the comment: Usage of read1(): * _BytesIO.read1(n) (_bytesio.c): calls bytesio_read(n) * _BytesIO.read1(n) (io.py): return self.read(n) * BufferedReader._read_unlocked(n=None): - if n is None or n==-1, call self.raw.read() in a "while True: ..." until EOF - else,

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

2009-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

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

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

2009-01-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

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

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou 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 it was recently

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

2009-01-19 Thread Antoine Pitrou
Antoine Pitrou 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 it was recently

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

2009-01-19 Thread HiroakiKawai
New submission from HiroakiKawai : 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 sure which is c