]> granicus.if.org Git - python/commit
bpo-30228: FileIO seek() and tell() set seekable (#1384)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 2 May 2017 13:10:39 +0000 (15:10 +0200)
committerGitHub <noreply@github.com>
Tue, 2 May 2017 13:10:39 +0000 (15:10 +0200)
commit999707373630ce090300c3c542066f493b12faa0
tree1085aacebf78a2a85280c6c9934ecfd315f13fcf
parent1dae7450c68bad498e57800387b24cb103c461fa
bpo-30228: FileIO seek() and tell() set seekable (#1384)

FileIO.seek() and FileIO.tell() method now set the internal seekable
attribute to avoid one syscall on open() (in buffered or text mode).

The seekable property is now also more reliable since its value is
set correctly on memory allocation failure.
Misc/NEWS
Modules/_io/fileio.c