GeezerVison is showing github.com — Secure coding is not enabled for restorable state! WARNING on Mac OS Sonoma 14.0 · Issue #110950 · python/cpython
Secure coding is not enabled for restorable state! WARNING on Mac OS Sonoma 14.0 #110950DescriptionBug report
Bug description:
With turtle_test.py containing
from turtle import home
home()
running
outputs:
2023-10-17 08:21:27.948 Python[19831:20908209] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
CPython versions tested on:
3.12
Operating systems tested on:
macOS
Linked PRs
Reacted by Benjamin and AmirSoroush Activityterryjreedy commented on Oct 17, 2023 For anyone's information, turtle.home should turtle screen to appear with the turtle at the home (origin) position and orientation. ronaldoussoren commented on Oct 17, 2023 Minimal reproducer: import tkinter; tkinter.Tk().
This is a problem in Tk, not in Tkinter as we don't use Cocoa in the Tkinter source code. Reacted by Christopher Chavez ugandhar84 commented on Oct 18, 2023 i'm also facing same error - do we have nay resolution for this? aivarannamaa commented on Oct 18, 2023 Reacted by Christopher Chavez, Loc and Oleg Iarygin SimpungaElias commented on Oct 18, 2023 what to do with this error? aivarannamaa commented on Oct 18, 2023 It looks just a warning to me. I haven't seen any misbehaviour in my app after upgrading to Sonoma. So I guess for now you can just ignore it. ronaldoussoren commented on Oct 18, 2023
It looks just a warning to me. I haven't seen any misbehaviour in my app after upgrading to Sonoma. So I guess for now you can just ignore it.
That's correct, this is just a warning from a system library about using functionality that's deprecated in macOS Sonoma. SimpungaElias commented on Oct 18, 2023 I am using PyCharm, so the problem is that the UI is not working, all parameters are set well, but all I am seeing is white color background BenjaminIsMyName commented on Oct 18, 2023 Minimal reproducer with pygame:
import pygame
pygame.init()
screen = pygame.display.set_mode((800, 600)) chrstphrchvz commented on Oct 18, 2023
I am using PyCharm, so the problem is that the UI is not working, all parameters are set well, but all I am seeing is white color background
@SimpungaElias, that issue sounds unrelated to the Secure coding is not enabled for restorable state! warning. ned-deily commented on Nov 21, 2023 Thanks for the PR. The fix for Tk in the macOS installer has now been merged for release in 3.13.0a2, 3.12.1, and 3.11.7. iDevSpread commented on Dec 4, 2023
I am using PyCharm, so the problem is that the UI is not working, all parameters are set well, but all I am seeing is white color background
I got the same issue, too. Do you fix it? Reacted by Sofia Imperatore Heilige-49 commented on Dec 4, 2023 Presently I am using Pycharm and it's not having any issue somehow and
works pretty well to date.
…u-aida commented on Dec 13, 2023 I got same error pysimplegui with matplotlib.
My environment configuration is
Python: 3.12 (Because of pysimplegui do not work with SONOMA)
Mac OS: 14.2 (Preview version of Sonoma had same issue)
Python problem is happened after I update to Sonoma. ned-deily commented on Dec 18, 2023 @u-aida: Note above: "The fix for Tk in the macOS installer has now been merged for release in 3.13.0a2, 3.12.1, and 3.11.7." And this only applies to those Pythons for macOS downloadable from the python.org website. If you are using a Python from another source, contact its distributor and ask them to update their version of Tk. Wangsd823 commented on Dec 18, 2023
wait guys i also have this problem, when i implement tkinter even though it pops up a showing window, there is nothing on it even though i followed the steps, but it is just not printing, in the console, there is this line of warning which is simular to the description above.
from tkinter import * root = Tk() myLabel = Label(root,text="helloworld") myLabel.pack() root.mainloop()
I had the same problem.
Python: 3.9.6
Tkinter: 8.5
Mac OS: 14.2 ned-deily commented on Dec 18, 2023
I had the same problem.
Python: 3.9.6 Tkinter: 8.5 Mac OS: 14.2
There seems to be a lot of confusion and conflation of issues here. This issue is closed and was about the secure coding warning that may be seen when using currently released versions of Tk, which is what Python's tkinter uses as a GUI library, on macOS 14 Sonoma. This message is only a warning and can be ignored. As noted above, a patch to eliminate the warning has been applied to the Tk released with the most recent python.org macOS installers (for 3.13.0a2, 3.12.1, and 3.11.7). If you use Python on macOS from another source, the Tk versions used by them would need to be patched to eliminate the warning.
Any other behavior you may be seeing is a different problem, unrelated to this issue. It might be a Tk problem or it might be a Python problem or it might be a usage problem, but it is not this problem. Anyone wanting to pursue another problem should follow the usual procedures, like looking for help in one of the many forums and checking the Python and Tk issue trackers for similar reports.
In this particular case, be aware that Tk 8.5 is extremely old and unsupported and likely has many problems on more recent macOS releases but unfortunately is still shipped by Apple in macOS and is used by the python3 supplied with Xcode and the Command Line Tools. Python 3.9.6 is also very old and 3.9 is now in the security-fix-only phase of its life cycle: the most recent release of Python 3.9 is 3.9.18 and the last full bugfix release with binary installers was 3.9.13. Python 3.11.x and 3.12.x are the current fully-supported release versions. locked as resolved and limited conversation to collaborators on Dec 18, 2023ronaldoussoren commented on Dec 19, 2023 Note that /usr/bin/python3 also loudly complains about the usage of tkinter:
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
It is highly unlikely that Apple will ever fix issues like this with Tk or upgrade Tk to a newer version. If you want to use Tkinter with Python you need to install a newer version.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|