Skip to content

Commit

Permalink
gh-88496: Fix IDLE test hang on macOS (#104025)
Browse files Browse the repository at this point in the history
Replace widget.update() with widget.update_idletasks in two places.
  • Loading branch information
terryjreedy authored May 1, 2023
1 parent 69bc86c commit 4b27972
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/idlelib/colorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def recolorize_main(self):
# crumb telling the next invocation to resume here
# in case update tells us to leave.
self.tag_add("TODO", next)
self.update()
self.update_idletasks()
if self.stop_colorizing:
if DEBUG: print("colorizing stopped")
return
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/outwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def write(self, s, tags=(), mark="insert"):
assert isinstance(s, str)
self.text.insert(mark, s, tags)
self.text.see(mark)
self.text.update()
self.text.update_idletasks()
return len(s)

def writelines(self, lines):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix IDLE test hang on macOS.

0 comments on commit 4b27972

Please sign in to comment.