#97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
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.
It previously deleted Window => Zoom Height by mistake.
(Zoom Height is now on the Options menu). On Mac, the settings
dialog is accessed via Preferences on the IDLE menu.
This follows the previous patch that changed idlelib file names.
Class names that matched old module names are not changed.
Change idlelib imports in turtledemo.__main__.
Exception: config-extensions.def. Previously, extension section
names, file names, and class names had to match. Changing section
names would create cross-version conflicts in config-extensions.cfg
(user customizations). Instead map old names to new file names
at point of import in editor.EditorWindow.load_extension.
Patch extensively tested with test_idle, idle_test.htest.py, a custom
import-all test, running IDLE in a console to catch messages,
and testing each menu item. Based on a patch by Al Sweigart.