This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients python-dev, terry.reedy
Date 2016-06-12.19:50:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Remove the now unneeded call in htest to _init_tk_type.  It was tempting to leave the call for the 'efficiency' of the direct call with the available root, but there is a mental efficiency in removing it and making _init_tk_type completely an internal implementation detail of macosx.

Remove the unneeded call in macosx.setupApp.  This makes the _init_tk_type local to its section of the module.  It also allows a test to set _tk_type to simulate being on a particular type of Mac and call setupApp without having the setting overwritten by the real value. Test_macosx now calls setupApp with each _tk_type set to each possible non-None value.

The same objective could have been met by conditioning the call with 'if _tk_type is  None:', but removing the call means that _init_tk_type is no longer ever called with a root, so the parameter can be removed and the function simplified.  This section of macosx now takes care of initializing itself and the rest of IDLE can simply call the isTypeTk functions without worrying about initialization.

Have macosx call its test when run as main.
Date User Action Args
2016-06-12 19:50:23terry.reedysetrecipients: + terry.reedy, python-dev
2016-06-12 19:50:23terry.reedysetmessageid: <>
2016-06-12 19:50:23terry.reedylinkissue27239 messages
2016-06-12 19:50:23terry.reedycreate