[Python-checkins] gh-88496: Fix IDLE test hang on macOS (#104025)
terryjreedy
webhook-mailer at python.org
Sun Apr 30 21:36:47 EDT 2023
https://github.com/python/cpython/commit/4b27972f5fe816d3616f97f8643d8ad922473ab5
commit: 4b27972f5fe816d3616f97f8643d8ad922473ab5
branch: main
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-04-30T21:36:27-04:00
summary:
gh-88496: Fix IDLE test hang on macOS (#104025)
Replace widget.update() with widget.update_idletasks in two places.
files:
A Misc/NEWS.d/next/IDLE/2023-04-30-20-01-18.gh-issue-88496.y65vUb.rst
M Lib/idlelib/colorizer.py
M Lib/idlelib/outwin.py
diff --git a/Lib/idlelib/colorizer.py b/Lib/idlelib/colorizer.py
index e9f19c145c86..b4df353012b7 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 ac67c904ab97..610031e26f1d 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):
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 000000000000..4f390d189d23
--- /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.
More information about the Python-checkins
mailing list