Uh oh!
There was an error while loading. Please reload this page.
gh-128014: fix handling of a default empty string passed to tkinter.Wm.wm_iconbitmap - #128015
Conversation
…ap` could not take effect when passing an empty string
default of tkinter.Wm.wm_iconbitmap could not take effect when passing an empty stringXiaokang2022
commented
Dec 17, 2024
I think this might need a "skip news" label. |
tomasr8
commented
Dec 17, 2024
This is a user-visible change, right? If so, this will need a news entry. |
terryjreedy
commented
Dec 17, 2024
Currently, widget.wm_iconbitmap treats A possible blurb: When passing @serhiy-storchaka This seems liike a trivial fix. Apply? Backport? |
serhiy-storchaka
commented
Dec 17, 2024
It is not the only site where all empty values are treated the same way as None. There was even a discussion about this somewhere. We should fix this issue all at once (if this is an issue) instead of one line per PR. |
serhiy-storchaka
commented
Dec 17, 2024
On other hand, this looks like a bug that blocks a useful use case. So we can fix only this bug in this PR. But we need a test for this. |
Xiaokang2022
commented
Dec 18, 2024
Sorry, I don't know how to test this. |
serhiy-storchaka
commented
Dec 18, 2024
No problem, I added a test. |
default of tkinter.Wm.wm_iconbitmap could not take effect when passing an empty stringdefault passed to tkinter.Wm.wm_iconbitmapdefault passed to tkinter.Wm.wm_iconbitmapdefault empty string passed to tkinter.Wm.wm_iconbitmapterryjreedy
commented
Dec 22, 2024
Macos-13 had 2 failures. Seem like should be spurious, in test_multiprocessing, but failed on retest, along with test_tkinter. Real, in new test iconbitmap in test_tkinter. |
Xiaokang2022
commented
Dec 28, 2024
Even before this PR change, |
serhiy-storchaka
commented
Dec 28, 2024
Oh, there is a bug in Tk (https://core.tcl-lang.org/tk/tktview/13ac26b35dc55f7c37f70b39d59d7ef3e63017c8). |
serhiy-storchaka
commented
Dec 31, 2024
It is better to wait until this bug was fixed in Tk, so we could skip the check conditionally. |
Thanks @Xiaokang2022 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…bitmap() (pythonGH-128015) (cherry picked from commit 58e9f95) Co-authored-by: Zhikang Yan <2951256653@qq.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sorry, @Xiaokang2022 and @serhiy-storchaka, I could not cleanly backport this to |
GH-128418 is a backport of this pull request to the 3.13 branch. |
…wm_iconbitmap() (pythonGH-128015) (cherry picked from commit 58e9f95) Co-authored-by: Zhikang Yan <2951256653@qq.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-128420 is a backport of this pull request to the 3.12 branch. |
…bitmap() (pythonGH-128015) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
vstinner
commented
Mar 27, 2026
The new test_wm_iconbitmap() test added by this change fails randomly on macos-26-intel with a timeout: see issue gh-146531. |
tkinter.Wm.wm_iconbitmaphas no effect when passing an empty string to the parameterdefault#128014