Skip to content

Commit

Permalink
pythongh-110950: add upstream fix to macOS installer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstphrchvz authored Oct 18, 2023
1 parent cb1bf89 commit 2cae8a5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
23 changes: 23 additions & 0 deletions Mac/BuildScript/backport_gh110950_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From https://core.tcl-lang.org/tk/info/ed7cfbac8db11aa0

diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 71d7c3385..e6a68356c 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -128,6 +128,16 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
observe(NSApplicationDidChangeScreenParametersNotification, displayChanged:);
observe(NSTextInputContextKeyboardSelectionDidChangeNotification, keyboardChanged:);
#undef observe
+}
+
+
+/*
+ * Fix for 10b38a7a7c.
+ */
+
+- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app
+{
+ return YES;
}

-(void)applicationWillFinishLaunching:(NSNotification *)aNotification
4 changes: 2 additions & 2 deletions Mac/BuildScript/build-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,14 @@ def library_recipes():
tcl_checksum='81656d3367af032e0ae6157eff134f89'

tk_checksum='5e0faecba458ee1386078fb228d008ba'
tk_patches = ['tk868_on_10_8_10_9.patch']
tk_patches = ['tk868_on_10_8_10_9.patch', 'backport_gh110950_fix.patch']

else:
tcl_tk_ver='8.6.13'
tcl_checksum='43a1fae7412f61ff11de2cfd05d28cfc3a73762f354a417c62370a54e2caf066'

tk_checksum='2e65fa069a23365440a3c56c556b8673b5e32a283800d8d9b257e3f584ce0675'
tk_patches = [ ]
tk_patches = ['backport_gh110950_fix.patch']


base_url = "https://prdownloads.sourceforge.net/tcl/{what}{version}-src.tar.gz"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Update macOS installer to include an upstream Tcl/Tk fix for the
``Secure coding is not enabled for restorable state!`` warning
encountered in Tkinter on macOS 14 Sonoma.

0 comments on commit 2cae8a5

Please sign in to comment.