Repository navigation
test_wm_iconbitmap() timeout after 10 min on "macOS / build and test (macos-26-intel)" CI #146531
Description
Activity
"
Lib/tkinter/__init__.py, line 2345 in wm_iconbitmap" is the last line of wm_iconbitmap(), where I added the comment:def wm_iconbitmap(self, bitmap=None, default=None): """Set bitmap for the iconified widget to BITMAP. Return the bitmap if None is given. Under Windows, the DEFAULT parameter can be used to set the icon for the widget and any descendants that don't have an icon set explicitly. DEFAULT can be the relative path to a .ico file (example: root.iconbitmap(default='myicon.ico') ). See Tk documentation for more information.""" if default is not None: return self.tk.call('wm', 'iconbitmap', self._w, '-default', default) else: return self.tk.call('wm', 'iconbitmap', self._w, bitmap) # <=== HANGS HERE
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Mar 28, 2026 It seems that it hangs on the first call with argument. I don't have macOS, so I cannot test in what circumstances it hangs. Can this be reproduced manually?
$ wish % toplevel .t .t % wm iconbitmap .t % wm iconbitmap .t hourglass %
Is is a bug in Tk 9.0.3 or in all Tk 9.0 versions and we just started to run tests with 9.0?
I don't have macOS, so I cannot test.
Is is a bug in Tk 9.0.3 or in all Tk 9.0 versions and we just started to run tests with 9.0?
Good question. I didn't check if Tk was upgraded recently on the macOS-intel image.
I suspect this is due to switching from the
macos-15-intelrunner tomacos-26-intelon 25th March: #145099.We started getting timeouts on 26th March: https://github.com/python/cpython/actions/runs/23591302016/job/68696963892
Actually, the very first run after the merge had a timeout on first attempt, and pass on the next: https://github.com/python/cpython/actions/runs/23538226684/job/68518834548#step:10:2115
Looks like a bug in Tk 9.0.3 on macOS 26 Intel, but macOS 26 Apple Silicon and macOS 15 (Intel + Apple Silicon) are all fine.
Here's a test of running
wishwith'wm iconbitmap . hourglass\nputs "OK: wm iconbitmap succeeded"\nexit\n'on all four. macOS 26 Intel times out after 60s, the others pass in a second or less:test_tk_iconbitmap.py.github/workflows/test_tk_iconbitmap.yml- https://github.com/hugovk/test/actions/runs/23888082370
This needs reporting to Tk.
Some things we could do in the meantime:
- Switch back to
macos-15-intelfor now - Conditionally skip
test_wm_iconbitmap - (There's already a conditional skip for another Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8)
Is is a bug in Tk 9.0.3 or in all Tk 9.0 versions and we just started to run tests with 9.0?
Unknown if it's only in 9.0.3. We've been testing 9.0.3 since November, and macOS 26 only since March.
Is is a bug in Tk 9.0.3 or in all Tk 9.0 versions and we just started to run tests with 9.0?
Also times out with version 8, specifically 8.6.17:
- Reacted by Victor Stinner
I opened #148032 to skip the Tk test on macOS 26 Intel, but the CI hung when configuring CPython:
We've seen some other similar things too: #145098 (comment)
So I've also opened #148038 to switch back to
macos-15-intelfor the main tests.The GitHub Action jobs moved back to
macos-15-intelwhich should work around this issue. So I close this issue for now. Reopen it if the issues reappears on our CIs.Reacted by Hugo van KemenadeRe-opening to fix the timeout now we're ready to upgrade the CI: #149991.
1 remaining item
I don't recall seeing this particular timeout when running tests on real Macs, either Apple Silicon or Intel. It could be due to the GHA setup. I don't have access to an Intel Mac at the moment but I can test it next week after PyCon.
Reacted by Victor Stinner and Hugo van KemenadeCan we close the issue since PR gh-148032 has been merged?
Can we close the issue since PR gh-148032 has been merged?
I would prefer to keep it open until we know better why this timeout occurs. We shouldn't have to disable the test.
I've backported #149991 from
mainback to 3.12 and we ran into some timeouts:Backport PRs of #149991
Branch PR macOS job tkinter 3.15 #153179 (merged) green, 18m Timeout (10 min) first pass; rerun passed 3.14 #153181 (merged) green, 18m Passed, no timeout 3.13 #153185 (open) red, 25m SIGSEGV first pass; Timeout (10 min) on rerun 3.12 #153186 (merged) green, 14m Passed, no timeout Post-merge branch runs
Branch macOS job tkinter 3.15 green, 28m Timeout (10 min) first pass; rerun passed 3.14 red, 27m SIGSEGV first pass; Timeout (10 min) on rerun 3.13 — Not merged yet 3.12 green, 17m Passed, no timeout So I'll also backport the test skip, until we get a fix.
- added 4 commits that reference this issue
on Jul 6, 2026 Try to backport PRs for #69134. The parts which touch existing tests, because many new tests were added.
We just got a timeout on for this test
macos-26-intelat https://github.com/python/cpython/actions/runs/28940873616/job/85862500892?pr=153327 with Tk 8.6.18.When 8.6.17 and 9.0.3 were the latest versions, we added this skip:
if ( t._windowingsystem == 'aqua' and sys.platform == 'darwin' and platform.machine() == 'x86_64' and platform.mac_ver()[0].startswith('26.') and ( patchlevel[:3] <= (8, 6, 17) or (9, 0) <= patchlevel[:3] <= (9, 0, 3) ) ): # https://github.com/python/cpython/issues/146531 # Tk bug 4a2070f0d3a99aa412bc582d386d575ca2f37323 self.skipTest('wm iconbitmap hangs on macOS 26 Intel')
Since then, 8.6.18 and 9.0.4 have come out, and 8.6.18 has filtered through Homebrew to our tests. We're still on 9.0.3 on
main.I suggest we skip for all versions until there's a fix available:
if ( t._windowingsystem == 'aqua' and sys.platform == 'darwin' and platform.machine() == 'x86_64' and platform.mac_ver()[0].startswith('26.') ): # https://github.com/python/cpython/issues/146531 # Tk bug 4a2070f0d3a99aa412bc582d386d575ca2f37323 # Not fixed as of Tk 8.6.18 and 9.0.4. self.skipTest('wm iconbitmap hangs on macOS 26 Intel')
Try to backport PRs for #69134. The parts which touch existing tests, because many new tests were added.
Those three PRs have all been backported to 3.13. We test Tk 9 on
main/3.15, and still have Tk 8 on 3.14 and older.Here's a run on 3.14, modified to do 4 x
macos-26-intel, so it has 8.6.18 that evades the skip, and we can see if those PRs help:And we got four timeouts:
- Result: FAILURE then SUCCESS
- Result: FAILURE then FAILURE
- Result: FAILURE then SUCCESS
- Result: SUCCESS
So they don't help in this case.
- added 5 commits that reference this issue
on Jul 9, 2026
Example of failure: https://github.com/python/cpython/actions/runs/23552862012/job/68571481619?pr=146357
test.pythoninfo:
The test_wm_iconbitmap() test was added by commit 58e9f95.
Linked PRs
wm iconbitmaptest on macOS 26 Intel #148032wm iconbitmaptest on macOS 26 Intel (GH-148032) #153188wm iconbitmaptest on macOS 26 Intel (GH-148032) #153189wm iconbitmaptest on macOS 26 Intel (GH-148032) #153190wm iconbitmaptest on macOS 26 Intel (GH-148032) #153191wm_iconbitmapskip on macOS 26 Intel #153348wm_iconbitmapskip on macOS 26 Intel (GH-153348) #153450wm_iconbitmapskip on macOS 26 Intel (GH-153348) #153451wm_iconbitmapskip on macOS 26 Intel (GH-153348) #153452wm_iconbitmapskip on macOS 26 Intel (GH-153348) #153453