New submission from STINNER Victor <victor.stin...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue12175>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to