https://github.com/python/cpython/commit/173dabeab84a5f4575d9d599f811280a4a8409d3 commit: 173dabeab84a5f4575d9d599f811280a4a8409d3 branch: 3.15 author: Victor Stinner <[email protected]> committer: vstinner <[email protected]> date: 2026-10-16T10:41:48Z summary:
[3.15] gh-159517: Modernize tkinter.simpledialog (#159518) gh-159517: Modernize tkinter.simpledialog No longer call ::tk::unsupported::MacWindowStyle on Tcl 9.1 and newer. 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 b9710a98ed0b92b..5c49d6c00f338a6 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -262,8 +262,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]
