You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows #84025
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-03-07.20:31:57.443>created_at=<Date2020-03-04.07:53:22.664>labels= ['OS-mac', '3.8', 'type-bug', 'expert-tkinter']
title='IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows'updated_at=<Date2020-03-07.20:31:57.442>user='https://bugs.python.org/JacinFerreira'
Thank you for your report. I am unable to reproduce that behavior. I suspect that the most likely explanation is that you are not actually using the python.org 3.8.2 but rather an IDLE and python from some other distributor (like Homebrew) that has a different version of Tk. There is an easy way to check that. From a Terminal.app window, enter the following commands to the Unix shell:
3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)]
If not, you are not using Python 3.8.2 from python.org.
Otherwise, then try:
/usr/local/bin/python3.8 -m idlelib
and see if the Preferences window is still black. If so, another possibility is that your saved IDLE preferences may be interfering. Choose Quit IDLE from the IDLE menu then try moving your existing IDLE preferences out of the way so that IDLE will use the "factory defaults":
cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib
JacinFerreira commented on Mar 4, 2020
JacinFerreiramannequin
MannequinAuthor
More actions
Thank you so much Ned. I appreciate it. What you said makes sense.
I went ahead and did what you suggested and validated that I am indeed running Python 3.8.2 but I'm still getting the black screens.
bin % /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)]
bin % /usr/local/bin/python3.8 -m idlelib
bin % cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib
I just upgraded to 10.14.6 and 3.8.2 and python/IDLE is normal. (I have so far closed the every login 'upgrade to Catalina' box because of reports like this.)
Ned, is current 8.6.10 any better than 8.6.9?
JacinFerreira commented on Mar 4, 2020
JacinFerreiramannequin
MannequinAuthor
More actions
I've attached the output of the test.pythoninfo as requested.
I am in Dark mode all the time. I did try Light mode first thing as sometimes apps aren't updated to work in Dark mode but the same exact issue happened.
---
bin % /usr/local/bin/python3
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> r = tk.Tk()
>>> ^D
The black one from 2.42 shows that the disfunction in your system is not in tkinter app and is likely upstream from that (the relationship between tk and mac).
Thanks for the pythoninfo output. I didn't see anything unusual there. So I remain perplexed. The thing is the macOS Tk 8.6.8 we supply with current python.org installers doesn't support Dark Mode at all, AFAIK. That was added in 8.6.9. I normally have macOS Dark Mode enabled on all of macOS systems, both real and virtual and, with the python.org Tk 8.6.8, Tk windows are always in Light mode, including on 10.15.3, regardless of the settings in System Preferences -> General. I do have at hand a MacPorts Python 3.8.2 that uses a MacPorts-supplied Tk 8.6.10; in that case, the Tk windows do follow the System Preferences Dark Mode preference and IDLE's Preference windows looks fine as one would expect it to in Dark mode. (Unfortunately, there are other problems with IDLE using Tk 8.6.10 that need to be resolved before we can move to it.)
There is this relevant discussion in the Apple Developer documentation:
Since the python.org macOS Pythons are built with a pre-10.14 SDK, they should be automatically opted out of Dark mode unless you add the NSRequiresAquaSystemAppearance key to the app bundle plist of IDLE.app or Python.app. And that is consistent with the behavior I observe. I verified that, by modifying the python.org IDLE.app plist to include a key NSRequiresAquaSystemAppearance with value NO, IDLE's Tk windows are displayed in Dark mode with the text windows completely dark as in your screen shots. So ... assuming we aren't missing something somewhere and you are not really executing the python.org supplied Python / IDLE when you see this behavior, my only guess at this point is that you have some extension or some system variable set that overrides this automatic opt-out of dark mode for older apps.
There is also some discussion in various forums of a system-wide preference, NSRequiresAquaSystemAppearance, that could be used in macOS Mojave to force dark mode. I tried playing with it on both 10.14 and 10.15 and saw no change in (unmodified) IDLE.app Tk behavior but perhaps I'm missing something.
Maybe all this rings a bell or two for you about customizations you might have made on your system? Otherwise, I don't know what else to suggest at this point. I guess you *could* try tweaking the IDLE.app plist to explicitly disable the dark mode opt-in and see if that makes a difference but, of course, that wouldn't find the root cause. And the other thing would be to try running the python.org in a vanilla 10.15 environment, perhaps in a Fusion VM.
I'm going to close this bug report since it seems unlikely to be a Python or even Tk 8.6.8 issue. But feel free to update or re-open if you find more information. Good luck!
Activity
JacinFerreira commentedon Mar 4, 2020
EXPECTED RESULTS
Windows should show text and are usable
ACTUAL RESULTS
Windows are all black and no text shows. IDLE is unusable in this state.
JacinFerreira commentedon Mar 4, 2020
Uploading another screen shot of preferences.
ned-deily commentedon Mar 4, 2020
Thank you for your report. I am unable to reproduce that behavior. I suspect that the most likely explanation is that you are not actually using the python.org 3.8.2 but rather an IDLE and python from some other distributor (like Homebrew) that has a different version of Tk. There is an easy way to check that. From a Terminal.app window, enter the following commands to the Unix shell:
You should see:
If not, you are not using Python 3.8.2 from python.org.
Otherwise, then try:
and see if the Preferences window is still black. If so, another possibility is that your saved IDLE preferences may be interfering. Choose Quit IDLE from the IDLE menu then try moving your existing IDLE preferences out of the way so that IDLE will use the "factory defaults":
JacinFerreira commentedon Mar 4, 2020
Thank you so much Ned. I appreciate it. What you said makes sense.
I went ahead and did what you suggested and validated that I am indeed running Python 3.8.2 but I'm still getting the black screens.
bin % /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)]
bin % /usr/local/bin/python3.8 -m idlelib
bin % cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib
So weird.
JacinFerreira commentedon Mar 4, 2020
which -a python python3
/usr/bin/python
/usr/local/bin/python3
/usr/bin/python3
2 remaining items
terryjreedy commentedon Mar 4, 2020
I just upgraded to 10.14.6 and 3.8.2 and python/IDLE is normal. (I have so far closed the every login 'upgrade to Catalina' box because of reports like this.)
Ned, is current 8.6.10 any better than 8.6.9?
JacinFerreira commentedon Mar 4, 2020
I've attached the output of the test.pythoninfo as requested.
I am in Dark mode all the time. I did try Light mode first thing as sometimes apps aren't updated to work in Dark mode but the same exact issue happened.
---
JacinFerreira commentedon Mar 4, 2020
tk window showing black
JacinFerreira commentedon Mar 5, 2020
Screenshot showing results of turtle demo
terryjreedy commentedon Mar 5, 2020
The black one from 2.42 shows that the disfunction in your system is not in tkinter app and is likely upstream from that (the relationship between tk and mac).
ned-deily commentedon Mar 7, 2020
Thanks for the pythoninfo output. I didn't see anything unusual there. So I remain perplexed. The thing is the macOS Tk 8.6.8 we supply with current python.org installers doesn't support Dark Mode at all, AFAIK. That was added in 8.6.9. I normally have macOS Dark Mode enabled on all of macOS systems, both real and virtual and, with the python.org Tk 8.6.8, Tk windows are always in Light mode, including on 10.15.3, regardless of the settings in System Preferences -> General. I do have at hand a MacPorts Python 3.8.2 that uses a MacPorts-supplied Tk 8.6.10; in that case, the Tk windows do follow the System Preferences Dark Mode preference and IDLE's Preference windows looks fine as one would expect it to in Dark mode. (Unfortunately, there are other problems with IDLE using Tk 8.6.10 that need to be resolved before we can move to it.)
There is this relevant discussion in the Apple Developer documentation:
https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app?language=objc
Since the python.org macOS Pythons are built with a pre-10.14 SDK, they should be automatically opted out of Dark mode unless you add the NSRequiresAquaSystemAppearance key to the app bundle plist of IDLE.app or Python.app. And that is consistent with the behavior I observe. I verified that, by modifying the python.org IDLE.app plist to include a key NSRequiresAquaSystemAppearance with value NO, IDLE's Tk windows are displayed in Dark mode with the text windows completely dark as in your screen shots. So ... assuming we aren't missing something somewhere and you are not really executing the python.org supplied Python / IDLE when you see this behavior, my only guess at this point is that you have some extension or some system variable set that overrides this automatic opt-out of dark mode for older apps.
There is also some discussion in various forums of a system-wide preference, NSRequiresAquaSystemAppearance, that could be used in macOS Mojave to force dark mode. I tried playing with it on both 10.14 and 10.15 and saw no change in (unmodified) IDLE.app Tk behavior but perhaps I'm missing something.
Maybe all this rings a bell or two for you about customizations you might have made on your system? Otherwise, I don't know what else to suggest at this point. I guess you *could* try tweaking the IDLE.app plist to explicitly disable the dark mode opt-in and see if that makes a difference but, of course, that wouldn't find the root cause. And the other thing would be to try running the python.org in a vanilla 10.15 environment, perhaps in a Fusion VM.
I'm going to close this bug report since it seems unlikely to be a Python or even Tk 8.6.8 issue. But feel free to update or re-open if you find more information. Good luck!