[New-bugs-announce] [issue12175] FileIO.readall() read the file position and size at each read
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?
nosy: haypo, pitrou
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>
More information about the New-bugs-announce