You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_wm_iconbitmap() timeout after 10 min on "macOS / build and test (macos-26-intel)" CI #146531
(...)
test_wm_attribute (test.test_tkinter.test_misc.WmTest.test_wm_attribute) ... ok
test_wm_iconbitmap (test.test_tkinter.test_misc.WmTest.test_wm_iconbitmap) ... Timeout (0:10:00)!
Thread 0x00007ff85c48cc00 (most recent call first):
File "/Users/runner/work/cpython/cpython/Lib/tkinter/__init__.py", line 2345 in wm_iconbitmap
File "/Users/runner/work/cpython/cpython/Lib/test/test_tkinter/test_misc.py", line 582 in test_wm_iconbitmap
File "/Users/runner/work/cpython/cpython/Lib/unittest/case.py", line 613 in _callTestMethod
File "/Users/runner/work/cpython/cpython/Lib/unittest/case.py", line 667 in run
(...)
"Lib/tkinter/__init__.py, line 2345 in wm_iconbitmap" is the last line of wm_iconbitmap(), where I added the comment:
defwm_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."""ifdefaultisnotNone:
returnself.tk.call('wm', 'iconbitmap', self._w, '-default', default)
else:
returnself.tk.call('wm', 'iconbitmap', self._w, bitmap) # <=== HANGS HERE
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?
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 wish with '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:
The GitHub Action jobs moved back to macos-15-intel which should work around this issue. So I close this issue for now. Reopen it if the issues reappears on our CIs.
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.
When 8.6.17 and 9.0.3 were the latest versions, we added this skip:
if (
t._windowingsystem=='aqua'andsys.platform=='darwin'andplatform.machine() =='x86_64'andplatform.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 4a2070f0d3a99aa412bc582d386d575ca2f37323self.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'andsys.platform=='darwin'andplatform.machine() =='x86_64'andplatform.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:
Activity
vstinner commentedon Mar 27, 2026
"
Lib/tkinter/__init__.py, line 2345 in wm_iconbitmap" is the last line of wm_iconbitmap(), where I added the comment:serhiy-storchaka commentedon 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?
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?
vstinner commentedon Apr 1, 2026
I don't have macOS, so I cannot test.
Good question. I didn't check if Tk was upgraded recently on the macOS-intel image.
hugovk commentedon Apr 2, 2026
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.ymlThis needs reporting to Tk.
Some things we could do in the meantime:
macos-15-intelfor nowtest_wm_iconbitmapUnknown if it's only in 9.0.3. We've been testing 9.0.3 since November, and macOS 26 only since March.
hugovk commentedon Apr 2, 2026
Also times out with version 8, specifically 8.6.17:
https://github.com/hugovk/test/actions/runs/23889733245
hugovk commentedon Apr 2, 2026
Reported: https://core.tcl-lang.org/tk/tktview/4a2070f0d3a99aa412bc582d386d575ca2f37323
hugovk commentedon Apr 3, 2026
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.vstinner commentedon Apr 7, 2026
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.hugovk commentedon May 18, 2026
Re-opening to fix the timeout now we're ready to upgrade the CI: #149991.
1 remaining item
ned-deily commentedon May 18, 2026
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.
vstinner commentedon May 18, 2026
Can we close the issue since PR gh-148032 has been merged?
ned-deily commentedon May 18, 2026
I would prefer to keep it open until we know better why this timeout occurs. We shouldn't have to disable the test.
hugovk commentedon Jul 6, 2026
I've backported #149991 from
mainback to 3.12 and we ran into some timeouts:Backport PRs of #149991
Post-merge branch runs
So I'll also backport the test skip, until we get a fix.
[3.12] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (…
[3.13] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (…
[3.14] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (…
[3.15] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (…
serhiy-storchaka commentedon Jul 6, 2026
Try to backport PRs for #69134. The parts which touch existing tests, because many new tests were added.
hugovk commentedon Jul 8, 2026
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:
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:
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:
So they don't help in this case.
gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (#153348)
[3.12] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-…
[3.14] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-…
[3.13] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-…
[3.15] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-…