[issue9962] GzipFile doesn't have peek()

2010-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed the improvements in r85221. Thank you! -- status: open -> closed ___ Python tracker ___ _

[issue9962] GzipFile doesn't have peek()

2010-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Right, I missed the change from self.max_read_chunk to 1024 > (read_size). Should not peek() limit to self.max_read_chunk as read() > does? This is used for the chunking of huge reads, but for peek(): 1) there is no chunking (peek() should do at most one raw

[issue9962] GzipFile doesn't have peek()

2010-10-01 Thread Nir Aides
Nir Aides added the comment: Right, I missed the change from self.max_read_chunk to 1024 (read_size). Should not peek() limit to self.max_read_chunk as read() does? -- ___ Python tracker __

[issue9962] GzipFile doesn't have peek()

2010-10-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Should be min(n, 1024) instead of max(...) Well, no, because we want to buffer a non-trivial amount of bytes for the next accesses. So, if n < 1024, buffer at least 1024 bytes. -- ___ Python tracker

[issue9962] GzipFile doesn't have peek()

2010-10-01 Thread Nir Aides
Nir Aides added the comment: Should be min(n, 1024) instead of max(...) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue9962] GzipFile doesn't have peek()

2010-09-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch fixing these issues. -- Added file: http://bugs.python.org/file19074/gzipfixup.patch ___ Python tracker ___

[issue9962] GzipFile doesn't have peek()

2010-09-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue9962] GzipFile doesn't have peek()

2010-09-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hir Nir, > BufferedIOBase is not documented to have peek(): > http://docs.python.org/dev/py3k/library/io.html Ah, you're right. > Small note about patch: > 1) IOError string says "read() on write-only...", should be "peek() on > write-only..." ? Indeed. >

[issue9962] GzipFile doesn't have peek()

2010-09-30 Thread Nir Aides
Nir Aides added the comment: Hi Antoine, BufferedIOBase is not documented to have peek(): http://docs.python.org/dev/py3k/library/io.html Small note about patch: 1) IOError string says "read() on write-only...", should be "peek() on write-only..." ? 2) Should be min() in self._read(max(self.m

[issue9962] GzipFile doesn't have peek()

2010-09-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r85100. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue9962] GzipFile doesn't have peek()

2010-09-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9962] GzipFile doesn't have peek()

2010-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Same patch with tests. -- Added file: http://bugs.python.org/file19053/gzippeek2.patch ___ Python tracker ___ __

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a first patch, tests still need to be written. -- keywords: +patch Added file: http://bugs.python.org/file19038/gzippeek.patch ___ Python tracker __

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
New submission from Antoine Pitrou : GzipFile claims to implement BufferedIOBase but doesn't have peek(). -- components: Library (Lib) messages: 117476 nosy: nirai, pitrou priority: normal severity: normal stage: needs patch status: open title: GzipFile doesn't have peek() type: feature