From 416817752dae53b1fb5dab45c75399ba9aa3d33f Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 26 Apr 2023 02:16:38 -0400 Subject: [PATCH 1/2] gh-88496: IDLE - fix test hangs on MacOS Replace widget.update() with widget.update_idletasks in two places. --- Lib/idlelib/colorizer.py | 2 +- Lib/idlelib/outwin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/idlelib/colorizer.py b/Lib/idlelib/colorizer.py index e9f19c145c8673..b4df353012b788 100644 --- a/Lib/idlelib/colorizer.py +++ b/Lib/idlelib/colorizer.py @@ -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 diff --git a/Lib/idlelib/outwin.py b/Lib/idlelib/outwin.py index ac67c904ab9797..610031e26f1dff 100644 --- a/Lib/idlelib/outwin.py +++ b/Lib/idlelib/outwin.py @@ -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): From cc77f35be50be98a705fd50dc2e8f500976cdb01 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sun, 30 Apr 2023 20:01:37 -0400 Subject: [PATCH 2/2] blurb --- .../next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst 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 index 00000000000000..4f390d189d23b5 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst @@ -0,0 +1 @@ +Fix IDLE test hang on macOS.