[issue7640] buffered io seek() buggy

2010-05-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r81203. Thank you, Pascal! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue7640] buffered io seek() buggy

2010-05-15 Thread Pascal Chambon
Pascal Chambon added the comment: Hello I advocate the inclusion of this patch to the 2.6 maintenance branch, because currently the io module in this branch (which is still the most recent 2.X version released) is simply broken. People using it will certainly encounter MAJOR file corruptions

[issue7640] buffered io seek() buggy

2010-02-01 Thread Pascal Chambon
Pascal Chambon added the comment: The patch itself... -- Added file: http://bugs.python.org/file16085/Py26_relative_seek.patch ___ Python tracker ___

[issue7640] buffered io seek() buggy

2010-02-01 Thread Pascal Chambon
Pascal Chambon added the comment: BufferedRandom's seek() is still borken in the latest svn revision of python2.6 (I haven't checked python2.7 yet), so here is a new, smaller patch, tested with the 6 IO-related test suites this time, on win32 and linux. -- ___

[issue7640] buffered io seek() buggy

2010-02-01 Thread Pascal Chambon
Changes by Pascal Chambon : Removed file: http://bugs.python.org/file15759/seek_cur_buffers_py26.patch ___ Python tracker ___ ___ Python-bugs-l

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Well, here is a patch for the seek() methods of io module, in python2.6 maintenance branch. Finally, I've only backported some assertions and the offset stuffs - I'm not comfortable enough about recent io refactorings to do more (it changed pretty quickly whi

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: Hum, with a selective merge (tortoiseSVN makes it easy), backporting _pyio should be doable in a decent time. Triaging pertinent tests should be more brain damaging :p I'm looking at this. -- ___ Python tracker

[issue7640] buffered io seek() buggy

2010-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So concerning python2.6, isn't that just possible to backport _pyio > (and its test suite) to it (renamed as io.py) ? I would not be against it, but someone has to provide a patch. The current _pyio.py might rely on other new behaviour of 2.7, so perhaps it w

[issue7640] buffered io seek() buggy

2010-01-06 Thread Pascal Chambon
Pascal Chambon added the comment: My bad, I had looked at _buffered_raw_seek, not buffered_seek >_< Indeed, the code is OK in both trunk _io an _pyio modules. And the SEEK_CUR flag (value : 1) seems more than sufficiently tested in test_io actually, for example in the function write_ops() : htt

[issue7640] buffered io seek() buggy

2010-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The problem seems to be fixed in trunk (the future 2.7). BufferedRandom.seek() contains a block labelled "# Undo read ahead." which does not exists in 2.6. I reproduce the problem with a file opened with mode "rb+" from io import open open("tmpfile", "w

[issue7640] buffered io seek() buggy

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you construct a test case? (it's even better if you fix the offending code as well of course) -- nosy: +pitrou ___ Python tracker ___

[issue7640] buffered io seek() buggy

2010-01-05 Thread Pascal Chambon
New submission from Pascal Chambon : I've noticed a severe bug in my python 2.6.2 io module, and looking at _buffered_raw_seek in http://svn.python.org/view/python/trunk/Modules/_io/bufferedio.c?view=markup, it seems the bug is still there in the C reimplementation of buffered io classes. Th