Message 187890 - Python tracker

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.

Content
In Python 2, a buffered file opened for writing is flushed by the C library when the process exit.  In Python 3, the _pyio and _io modules don't do it reliably.  They rely on __del__ being called, which is not neccesarily the case.  The attached example ends with the file 'foo' empty (tested with Python 3.3 and the current trunk).  The same example in Python 2 using the built-in open() cannot end with 'foo' empty.