]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-97527: IDLE: protect macosx Tk() call when no GUI (#97530)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 24 Sep 2022 21:38:58 +0000 (17:38 -0400)
committerGitHub <noreply@github.com>
Sat, 24 Sep 2022 21:38:58 +0000 (17:38 -0400)
commit9704f8da333a51da32318f16106d45abb20fab76
treef5c0dfebfd0ce5981c4212068c8b311e793bbb03
parentdb39050396a104c73d0da473a2f00a62f9dfdfaa
gh-97527: IDLE: protect macosx Tk() call when no GUI (#97530)

Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
Lib/idlelib/macosx.py