mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +00:00
[3.12] gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (GH-124310) (#124319)
gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (GH-124310)
https://github.com/python/cpython/issues/88496 replaced text.update with text.update_idletasks in colorizer.py and outwin.py to fix test failures on macOS. While theoretically correct, the result was Shell freezing when receiving continuous short strings to print. Test: `while 1: 1`.
The guess is that there is no idle time in which to do the screen update. Reverting the change in one of the files,
outwin, fixes the issue. Colorizer runs ever 1/20 second and seems to work fine.
When running test-outwin on macOS, alias 'update'
to 'update_idletasks on the text used for testing.
(cherry picked from commit d5f95ec07b
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
25312403de
commit
cf39a5f22c
3 changed files with 7 additions and 1 deletions
|
@ -112,7 +112,7 @@ class OutputWindow(EditorWindow):
|
|||
assert isinstance(s, str)
|
||||
self.text.insert(mark, s, tags)
|
||||
self.text.see(mark)
|
||||
self.text.update_idletasks()
|
||||
self.text.update()
|
||||
return len(s)
|
||||
|
||||
def writelines(self, lines):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue