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 terry.reedy
Recipients ke265379ke, steven.daprano, terry.reedy
Date 2020-12-26.02:19:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"Enhancements" (non-bugfix feature changes) can only be applied to future versions.  However, you are asking for the reversion of an intentional feature change made in a 'bugfix' release# for (I believe) 3.1.  Before the change, as I remember, truncating to 0 *did* move the file pointer back to 0.  As I remember, Guide von Rossum requested the change and Antoine Pitrou made it.
new says "The current stream position isn’t changed."

If you also want to change the stream position, do it with seek(), perhaps before the truncate.

# This change in a bugfix release, a violation the rule stated above, broke the code of multiple people.  (We thereafter strengthened the  policy.)  To fix my code, I had to add a seek(0).  I put it before truncate(0), so I know that this works.
Date User Action Args
2020-12-26 02:19:55terry.reedysetrecipients: + terry.reedy, steven.daprano, ke265379ke
2020-12-26 02:19:55terry.reedysetmessageid: <>
2020-12-26 02:19:55terry.reedylinkissue42733 messages
2020-12-26 02:19:55terry.reedycreate