SIGN IN SIGN UP

gh-97527: IDLE: protect macosx Tk() call when no GUI (GH-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.
(cherry picked from commit 9704f8da333a51da32318f16106d45abb20fab76)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
M
Miss Islington (bot) committed
a7a7da4acfb0cb33b7d67eea695f2612f38f477f
Parent: 2a50772
Committed by GitHub <noreply@github.com> on 9/24/2022, 10:01:45 PM