[New-bugs-announce] [issue12175] FileIO.readall() read the file position and size at each read

STINNER Victor report at bugs.python.org
Wed May 25 14:14:00 CEST 2011


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

FileIO.readall() reads the file position and size before each call to read(), to adjust the buffer size.

Moreover FileIO.readall() calls lseek() on Windows: it should use _lseeki64() instead, to handle correctly file bigger than 2 GB (or maybe 4 GB? I don't know).

Attached patch fixes both problems.

--

BufferedReader.read() calls FileIO.read() until FileIO.read() returns an empty byte string. Why not calling FileIO.read() only once?

----------
components: IO
files: fileio_readall.patch
keywords: patch
messages: 136840
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: FileIO.readall() read the file position and size at each read
versions: Python 3.3
Added file: http://bugs.python.org/file22105/fileio_readall.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12175>
_______________________________________


More information about the New-bugs-announce mailing list