]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-88496: Fix IDLE test hang on macOS (#104025)
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 1 May 2023 01:36:27 +0000 (21:36 -0400)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 01:36:27 +0000 (21:36 -0400)
Replace widget.update() with widget.update_idletasks in two places.

Lib/idlelib/colorizer.py
Lib/idlelib/outwin.py
Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst [new file with mode: 0644]

index e9f19c145c867395ceb622375fe917bb1f736f5e..b4df353012b78805e34d7328c9050af4de9ba289 100644 (file)
@@ -310,7 +310,7 @@ class ColorDelegator(Delegator):
                     # 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
index ac67c904ab9797b67a55bffcc35e7d2d952f26aa..610031e26f1dffed90945f0c755ef50b54c1b872 100644 (file)
@@ -112,7 +112,7 @@ class OutputWindow(EditorWindow):
         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):
diff --git a/Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst b/Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst
new file mode 100644 (file)
index 0000000..4f390d1
--- /dev/null
@@ -0,0 +1 @@
+Fix IDLE test hang on macOS.