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 serhiy.storchaka
Recipients bquinlan, pitrou, serhiy.storchaka, terry.reedy
Date 2014-10-12.13:55:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Yet one related bug is that flush() isn't called at all if the file was opened with closefd=False.

>>> import io, os
>>> class MyIO(io.FileIO):
...     def flush(self):
...         print('closed:', self.closed)
>>> fd ='test.out', os.O_WRONLY|os.O_CREAT)
>>> f = MyIO(fd, 'wb', closefd=False)
>>> f.close()

The proposed simple patch fixes both bugs.
Date User Action Args
2014-10-12 13:55:15serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, bquinlan, pitrou
2014-10-12 13:55:15serhiy.storchakasetmessageid: <>
2014-10-12 13:55:15serhiy.storchakalinkissue5700 messages
2014-10-12 13:55:15serhiy.storchakacreate