[issue1323] py3k: file.truncate() changes the file position

2007-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: Looks fine to me. Committed revision 58658. -- nosy: +gvanrossum resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1323] py3k: file.truncate() changes the file position

2007-10-24 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1323] py3k: file.truncate() changes the file position

2007-10-24 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: This patch corrects a problem in test_file.py on Windows: f.truncate() seeks to the truncation point, but does not empty the buffers. In the test, f.tell() returns -1... Now we flush the file before, and seek to the initial position after. The same trick