Skip to content

Commit 4b27972

Browse files
authored
gh-88496: Fix IDLE test hang on macOS (#104025)
Replace widget.update() with widget.update_idletasks in two places.
1 parent 69bc86c commit 4b27972

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Lib/idlelib/colorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def recolorize_main(self):
310310
# crumb telling the next invocation to resume here
311311
# in case update tells us to leave.
312312
self.tag_add("TODO", next)
313-
self.update()
313+
self.update_idletasks()
314314
if self.stop_colorizing:
315315
if DEBUG: print("colorizing stopped")
316316
return

Lib/idlelib/outwin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def write(self, s, tags=(), mark="insert"):
112112
assert isinstance(s, str)
113113
self.text.insert(mark, s, tags)
114114
self.text.see(mark)
115-
self.text.update()
115+
self.text.update_idletasks()
116116
return len(s)
117117

118118
def writelines(self, lines):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix IDLE test hang on macOS.

0 commit comments

Comments
 (0)