Index: Modules/tkinter.h =================================================================== --- Modules/tkinter.h (revision 69473) +++ Modules/tkinter.h (working copy) @@ -22,4 +22,12 @@ "Calling Tk_Init again after a previous call failed might deadlock" #endif +/* Starting with Tk 8.4.7, we shouldn't need to copy & paste pieces of + * the old tkMacOSXAppInit.c (now living in tkMacOSXInit.c), the TkpInit + * provided by tk itself should handle all the details. + */ +#if defined(TK_AQUA) && TK_VERSION_HEX < 0x08040702 +#define TKINTER_OLD_TK_AQUA +#endif + #endif /* !TKINTER_H */ Index: Modules/_tkinter.c =================================================================== --- Modules/_tkinter.c (revision 69474) +++ Modules/_tkinter.c (working copy) @@ -3218,7 +3218,7 @@ Py_TYPE(&PyTclObject_Type) = &PyType_Type; PyDict_SetItemString(d, "Tcl_Obj", (PyObject *)&PyTclObject_Type); -#ifdef TK_AQUA +#ifdef TKINTER_OLD_TK_AQUA /* Tk_MacOSXSetupTkNotifier must be called before Tcl's subsystems * start waking up. Note that Tcl_FindExecutable will do this, this * code must be above it! The original warning from Index: Modules/tkappinit.c =================================================================== --- Modules/tkappinit.c (revision 69473) +++ Modules/tkappinit.c (working copy) @@ -32,7 +32,7 @@ const char *_tkinter_tk_failed; #endif -#ifdef TK_AQUA +#ifdef TKINTER_OLD_TK_AQUA #ifndef MAX_PATH_LEN #define MAX_PATH_LEN 1024 #endif @@ -58,7 +58,7 @@ if (Tcl_Init (interp) == TCL_ERROR) return TCL_ERROR; -#ifdef TK_AQUA +#ifdef TKINTER_OLD_TK_AQUA /* pre- Tk_Init code copied from tkMacOSXAppInit.c */ Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tklibrary", tkLibPath, MAX_PATH_LEN, 1); @@ -113,7 +113,7 @@ main_window = Tk_MainWindow(interp); -#ifdef TK_AQUA +#ifdef TKINTER_OLD_TK_AQUA TkMacOSXInitAppleEvents(interp); TkMacOSXInitMenus(interp); #endif