https://github.com/python/cpython/commit/8c27786e50a8230510d4044570a3eb4d30f09358 commit: 8c27786e50a8230510d4044570a3eb4d30f09358 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: vstinner <[email protected]> date: 2026-10-16T11:09:49Z summary:
[3.14] gh-159517: Modernize tkinter.simpledialog (GH-159518) (#159522) [3.15] gh-159517: Modernize tkinter.simpledialog (GH-159518) gh-159517: Modernize tkinter.simpledialog No longer call ::tk::unsupported::MacWindowStyle on Tcl 9.1 and newer. (cherry picked from commit 173dabeab84a5f4575d9d599f811280a4a8409d3) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> files: M Lib/tkinter/simpledialog.py diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index 81edd77e0bd2446..2df946ea504f456 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -259,8 +259,11 @@ def _place_window(w, parent=None): def _setup_dialog(w): if w._windowingsystem == "aqua": - w.tk.call("::tk::unsupported::MacWindowStyle", "style", - w, "moveableModal", "") + if w.info_patchlevel() >= (9, 1): + w.wm_attributes(stylemask='titled') + else: + w.tk.call('::tk::unsupported::MacWindowStyle', 'style', + w, 'moveableModal', '') elif w._windowingsystem == "x11": w.wm_attributes(type="dialog") _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
