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 gvanrossum, serhiy.storchaka, terry.reedy
Date 2019-05-06.08:06:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557130000.42.0.641912705253.issue36807@roundup.psfhosted.org>
In-reply-to
Content
f.flush() was removed because it is redundant if followed by f.close(). f.close() calls f.flush() internally. f.close() is now called implicitly in __exit__() when exit from the with statement.

Guido restores f.flush() because he needs to flush the buffer of the buffered stream before calling os.fsync(f.fileno()). And f.fileno() can be used only for not closed file. So this change looks reasonable to me.

I do not know what are the troubles with Adafruit's
Circuit Playground Express. I think that flushing the OS filesystem cache is the work of the OS itself, and lingering the data in the OS-wide cache should not affect userspace. But maybe there are specific circumstences, for example if IDLE and the consumer of Python source files are ran on different machines.
History
Date User Action Args
2019-05-06 08:06:40serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, terry.reedy
2019-05-06 08:06:40serhiy.storchakasetmessageid: <1557130000.42.0.641912705253.issue36807@roundup.psfhosted.org>
2019-05-06 08:06:40serhiy.storchakalinkissue36807 messages
2019-05-06 08:06:40serhiy.storchakacreate