[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks all! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: > Do you mean from CircuitPython? No, I was asking about regular Python on Windows. I was not clear to me whether any of the software that Nina ran (other than possibly Adafruit USB drivers) was from Adafruit. I am now guessing that is was all 3rd party st

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 353f8d2282b1a48376f8813fd1170445a0cda873 by Terry Jan Reedy in branch '2.7': [2.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (GH-13293) https://github.com/python/cpython/commit/353f8d2282b1a48376f8813fd1170445a0cda8

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR 13102 is original patch for master; it was merged, not closed. PR 13284 fixed blurb for master. PR 13280 backport for 3.7 was closed trying to restart bogus failure; can't do that for backports. PR 13288 is second backport; only optional Azure Pipilines fai

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +13204 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 68a11b6e6a73cd2e9b49e5df9973877b2fed6277 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': [3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288) https://github.com/python/cpython/commit/68a11b6e6a73cd2e9

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: When 3.x is done, I will do 2.7. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +13198 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +13191 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +13186 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 4f098b35f58e911639f8e9adc393d5cf5c792e7f by Terry Jan Reedy (Guido van Rossum) in branch 'master': bpo-36807: When saving a file in IDLE, call flush and fsync (#13102) https://github.com/python/cpython/commit/4f098b35f58e911639f8e9adc393d5cf5c79

[issue36807] IDLE doesn't call os.fsync()

2019-05-12 Thread Guido van Rossum
Guido van Rossum added the comment: @Terry please see my comment on the PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36807] IDLE doesn't call os.fsync()

2019-05-12 Thread Dan Halbert
Dan Halbert added the comment: Fix tested and works! Comment from PR duplicated here. I tested this fix by editing the 3.7.3 IDLE code by hand, and editing this test program as code.py on a CIRCUITPY drive on Windows 10: import time i = 0 while True: print(i) i += 1 print("""\ 12

[issue36807] IDLE doesn't call os.fsync()

2019-05-07 Thread Dan Halbert
Dan Halbert added the comment: >Dan, slightly OT, but I am curious whether one can access USB ports (in a >system-dependent manner) directly from python code via os.system and ctypes? Do you mean from CircuitPython? The USB impplementation provides HID keyboard, mouse, and gamepad devices, C

[issue36807] IDLE doesn't call os.fsync()

2019-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I watched the talk by Nina Zakharenko at https://www.youtube.com/watch?v=35mXD40SvXM. Since I love being able to save, compile, and run a file with one keystroke, I appreciate people wanting to do the equivalent with CircuitExpress and Adafruit. In IDLE, p

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Dan Halbert
Dan Halbert added the comment: I'm one of the CircuitPython core devs. This issue is OS-dependent: Windows and Linux don't necessarily write data and metadata out to USB drives promptly. The problem is particularly acute for FAT12 filesystems on Windows, which are typically 16MB or smaller:

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Guido van Rossum
Guido van Rossum added the comment: That board implements a USB filesystem that you plug into a computer (via a cable). The control software on the board watches this USB filesystem, and when the "code.py" file changes it reloads that file and executes it with CircuitPython (Adafruit's fork

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Terry J. Reedy
Terry J. Reedy 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 sho

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: OS and disk interaction is not something I know a lot about. I don't know how long different OSes take to write things out by themselves, and therefore how much real danger there is of loosing data. However, IDLE is used in places where power is less relia

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seems like a good idea. I am assuming that open('somename', ...) always result in a file object with .fileno defined. Although I am mostly not touching 2.7, this should be easy to do. It will have to be done manually since iomenu was then IOBinding.

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
Guido van Rossum added the comment: If/when you accept this we should also backport it as far as we can. -- ___ Python tracker ___

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
New submission from Guido van Rossum : 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/). I *think* that the problem referred to is that

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +13015 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu