GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up|
@dhalbert Can you test this on Windows? Thanks for finding this issue in the first place! |
|
I tested this fix by editing the 3.7.3 IDLE code by hand, and editing this test program as
I typically test write flushing by editing a short program like this, and duplicating the print lines so that the size of the program grows by >512 bytes. This forces a rewrite of the FAT12 information because the program has increased in size by one or more filesystem blocks. Then I shrink it back down again. If file flushing doesn't happen immediately, the program will often throw a syntax error (because it's missing some blocks), or CircuitPython will get an I/O error, which is what happened before I patched IDLE. So this looks good! |
|
@terryjreedy I personally think this is good to go in. The standard builtin |
|
I am most worried about an exception from pulling the usb plug, in which case ignoring it should be fine. I will merge this tomorrow with try:...except:pass added. |
|
I don't see why anything extra is needed. There's already a try/except OSError that puts up a dialog box. I just tried this on Mac (edit file, remove USB plug, try to save) and it worked as expected. |
4f098b3
into
python:master
|
@terryjreedy: Please replace |
|
Thanks @gvanrossum for the PR, and @terryjreedy for merging it |
|
Thanks @gvanrossum for the PR, and @terryjreedy for merging it |
|
GH-13280 is a backport of this pull request to the 3.7 branch. |
|
OK, I'll send a fix for the NEW typo. |
|
Typo fix is here: #13284 |
|
Thanks @gvanrossum for the PR, and @terryjreedy for merging it |
|
GH-13288 is a backport of this pull request to the 3.7 branch. |
gvanrossum commentedMay 5, 2019
•
edited by bedevere-bot
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.
https://bugs.python.org/issue36807