bpo-36807: When saving a file in IDLE, call flush and fsync by gvanrossum · Pull Request #13102 · python/cpython

@gvanrossum

This came up during today's final PyCon keynote -- IDLE was called out
as one of the two editors *not* to use when live-coding on Adafruit's
Circuit Playground Express (https://www.adafruit.com/product/3333).

I *think* that the problem referred to is that IDLE doesn't guarantee
that the bits are actually flushed to disk -- they may linger in the
OS filesystem cache.  And I *think* this PR fixes the issue.

I've tested that this doesn't break things, but I don't have the right
cable around so I cannot test this with the hardware handed out to
PyCon attendees until Wednesday at the earliest.

@gvanrossum gvanrossum changed the title [idle] When saving a file, call flush and fsync bpo-36807 When saving a file, call flush and fsync

May 5, 2019

@gvanrossum gvanrossum changed the title bpo-36807 When saving a file, call flush and fsync bpo-36807 When saving a file in IDLE, call flush and fsync

May 5, 2019

@gvanrossum gvanrossum changed the title bpo-36807 When saving a file in IDLE, call flush and fsync bpo-36807: When saving a file in IDLE, call flush and fsync

May 5, 2019

@gvanrossum

serhiy-storchaka

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 13, 2019
…-13102)

(cherry picked from commit 4f098b3)

Co-authored-by: Guido van Rossum <guido@python.org>

dhalbert

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 13, 2019
…-13102)

(cherry picked from commit 4f098b3)

Co-authored-by: Guido van Rossum <guido@python.org>

terryjreedy pushed a commit that referenced this pull request

May 13, 2019

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request

May 13, 2019

terryjreedy added a commit that referenced this pull request

May 13, 2019