[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-29 Thread Pascal Chambon
Pascal Chambon added the comment: The change was announced in http://docs.python.org/dev/whatsnew/2.7.html, but indeed it wasn't advertised in py3k changes - my apologies, I didn't check it was. I agree that the doc should be clarified on several aspects. * The returned value is the new file

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-28 Thread Nick Coghlan
Nick Coghlan added the comment: For the record, Guido's decision to change 3.1: http://mail.python.org/pipermail/python-dev/2009-September/092247.html -- nosy: +ncoghlan ___ Python tracker

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should not have been closed yet. The announced policy is that bugfix releases should not add or change APIs. I think this hidden change (there is no What' New in 3.1.2 doc) should be reverted in 3.1.3. I will post on py-dev for other opinions. That asid

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: This was an exceptional API change in 3.1.2: truncate() doesn't move the file pointer anymore, you have to do it yourself (with seek(0) in your case). I'm sorry for the inconvenience; the change was motivated by the desire of having an API more consistent wit

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Terry J. Reedy
New submission from Terry J. Reedy : Some of my tests use io.StringIO and assert that captured print output equals expected output. Until now, I reused one buffer by truncating between tests. I recently replaced 3.1.1 with 3.1.2 (WinXP) and the *second* test of each run started failing. The fo