For overrideRootMenu, move nested functions to module level. Try to move 3 imports to module level. Test startup on mac. Mock 'window' with mock functions.
Ned, I would like to rename at least some of the functions in idlelib.macosx. For instance, function overrideRootMenu to override_root_menu. Would this affect any of the installation adjustments? IE, does the installer import the module for whatever reason? Also, do the windowing types on currently supported machines still include all of Xquartz, Cocoa, Carbon (both Aqua), and other? Is the windowing type determined by the hardware, or by the macOS version?
> Would this affect any of the installation adjustments? I don't think so but there's one way to be sure :) If you merge your changes to master, we can doublecheck before backporting them. > Is the windowing type determined by the hardware, or by the macOS version? The windowing type is determined by the variant of Tk that tkinter is dynamically linking with. While Cocoa Tk is now the most common, it is still possible to run into the other variants; for example, MacPorts supports building an X11 (Xquartz) variant of Tk 8.6 along with a Cocoa one. If support for the various window types isn't causing a maintenance burden, it would be nice to retain them.