This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josh.r
Recipients Albert.Zeyer, josh.r
Date 2017-05-03.19:02:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493838167.79.0.89767182856.issue30250@psf.upfronthosting.co.za>
In-reply-to
Content
For the record, the StringIO module is Python 2 only (replaced by io.StringIO and io.BytesIO for Py3, which are also available on 2.6 and higher if you need consistency), and only documents truncate by reference to the generic docs for the built-in file object. Admittedly, the built-in file object docs say the position shouldn't change on truncate, but given:

1. StringIO is deprecated and no longer maintained
2. Code using it may rely on this incorrect behavior

I can't see fixing this beyond possibly mentioning the quirk in the 2.x StringIO docs. Since io.StringIO is correct, there is nothing to fix in 3.x.
History
Date User Action Args
2017-05-03 19:02:47josh.rsetrecipients: + josh.r, Albert.Zeyer
2017-05-03 19:02:47josh.rsetmessageid: <1493838167.79.0.89767182856.issue30250@psf.upfronthosting.co.za>
2017-05-03 19:02:47josh.rlinkissue30250 messages
2017-05-03 19:02:47josh.rcreate