[issue36807] IDLE doesn't call os.fsync()
Terry J. Reedy
report at bugs.python.org
Mon May 6 03:42:44 EDT 2019
Terry J. Reedy <tjreedy at udel.edu> added the comment:
The io doc says for IOBase flush()
Flush the write buffers of the stream if applicable. This does nothing for read-only and non-blocking streams.
and for BufferedWriter flush()
Force bytes held in the buffer into the raw stream. A BlockingIOError should be raised if the raw stream blocks.
On 3.x, open(filename, "wb"), used in writefile(), returns a BufferedWriter. So it seems than an exception is possible, which would crash IDLE without try-except.
Serhiy, please read the previous message(s). Do you remember if you intended to remove the f.flush in writefile(), which Guido proposes to restore?
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36807>
_______________________________________
More information about the Python-bugs-list
mailing list