Skip to content

IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows #84025

Closed

Description

@JacinFerreira
BPO 39844
Nosy @terryjreedy, @ronaldoussoren, @ned-deily, @erlend-aasland
Files
  • Screen Shot 2020-03-03 at 11.51.21 PM.png
  • Screen Shot 2020-03-03 at 11.51.36 PM.png
  • test.pythoninfo.output.log
  • Screen Shot 2020-03-04 at 2.42.10 PM.png
  • Screen Shot 2020-03-04 at 7.39.02 PM.png
  • 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 = None
    closed_at = <Date 2020-03-07.20:31:57.443>
    created_at = <Date 2020-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 = <Date 2020-03-07.20:31:57.442>
    user = 'https://bugs.python.org/JacinFerreira'

    bugs.python.org fields:

    activity = <Date 2020-03-07.20:31:57.442>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-07.20:31:57.443>
    closer = 'ned.deily'
    components = ['macOS', 'Tkinter']
    creation = <Date 2020-03-04.07:53:22.664>
    creator = 'Jacin Ferreira'
    dependencies = []
    files = ['48947', '48948', '48951', '48952', '48953']
    hgrepos = []
    issue_num = 39844
    keywords = []
    message_count = 13.0
    messages = ['363334', '363335', '363340', '363360', '363361', '363373', '363386', '363390', '363398', '363399', '363415', '363420', '363615']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'ronaldoussoren', 'ned.deily', 'erlendaasland', 'Jacin Ferreira']
    pr_nums = []
    priority = 'normal'
    resolution = 'works for me'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue39844'
    versions = ['Python 3.8']

    Activity

    1. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor
      1. MacBook Pro 13" running MacOS 10.15.3 Catalina
      2. Fresh install of Python 3.8.2 from python.org
      3. Launch IDLE
      4. Observe Python 3.8.2 Shell
      5. Goto File Menu
      6. Select Preferences
      7. Observe Preferences

      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.

    2. added
      3.8 (EOL)
      type-bug
      on Mar 4, 2020
    3. added
      3.8 (EOL)
      type-bug
      on Mar 4, 2020
    4. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor

      Uploading another screen shot of preferences.

    5. ned-deily commented on Mar 4, 2020

      @ned-deily
      Member

      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:

      /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
      

      You should see:

      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
      
    6. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor

      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.

    7. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor

      which -a python python3

      /usr/bin/python
      /usr/local/bin/python3
      /usr/bin/python3

    8. 2 remaining items

    9. removed their assignment
      on Mar 4, 2020
    10. removed their assignment
      on Mar 4, 2020
    11. terryjreedy commented on Mar 4, 2020

      @terryjreedy
      Member

      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?

    12. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor

      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
    13. JacinFerreira commented on Mar 4, 2020

      JacinFerreiramannequin
      MannequinAuthor

      tk window showing black

    14. JacinFerreira commented on Mar 5, 2020

      JacinFerreiramannequin
      MannequinAuthor

      Screenshot showing results of turtle demo

    15. terryjreedy commented on Mar 5, 2020

      @terryjreedy
      Member

      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).

    16. ned-deily commented on Mar 7, 2020

      @ned-deily
      Member

      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!

    17. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)OS-mactopic-tkintertype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions