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 arigo
Recipients arigo, neologix, pitrou
Date 2013-04-27.18:46:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367088398.06.0.271092795297.issue17852@psf.upfronthosting.co.za>
In-reply-to
Content
It used to be a consistently reliable behavior in Python 2 (and we made it so in PyPy too), provided of course that the process exits normally; but it no longer is in Python 3.  Well I can see the reasons for not flushing files, if it's clearly documented somewhere as a change of behavior from Python 2.

However I'm complaining about the current behavior: files are flushed *most of the time*.  That's a behavior that is clearly misleading, or so I would think.  I'm rather sure that there are many small scripts and large programs out there relying on automatic flushing, and then one day they'll hit a case where the file is not flushed and get the worst kind of error: a file unexpectedly truncated at 99% of its length, in a way that cannot be reproduced by small examples.

Feel free to close anyway as not-a-bug; I won't fight the Python 3 behavior, because Python 2 works as expected.
History
Date User Action Args
2013-04-27 18:46:38arigosetrecipients: + arigo, pitrou, neologix
2013-04-27 18:46:38arigosetmessageid: <1367088398.06.0.271092795297.issue17852@psf.upfronthosting.co.za>
2013-04-27 18:46:38arigolinkissue17852 messages
2013-04-27 18:46:37arigocreate