Author ned.deily
Recipients AndrewGYork, IrvKalb, RM, alftheelf, ned.deily, ronaldoussoren, terry.reedy
Date 2021-01-05.22:04:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609884281.82.0.445868928795.issue38946@roundup.psfhosted.org>
In-reply-to
Content
Thanks, Ronald and others. I have done some testing now with macOS 11 Big Sur and retested on 10.15 Catalina and with various versions of Tk and what I am seeing is as follows.

- On macOS 11.1 Big Sur with IDLE.app from the python.org 3.9.1 universal2 installer set as the user default for .py files, double-clicking on a .py file causes IDLE 3.10 to launch and the .py file to open in an edit window as expected. Double-clicking on additional .py files in the Finder while IDLE is already launched does cause the files to be opened in the active IDLE.app also as expected. Performing the same sequence with the same 3.9.1 installer on macOS 10.15.7 Catalina, double-clicking on additional files do not cause them to be opened in the active IDLE.app as reported in this issue.

- I also verified that the same behavior is seen with IDLE.app from a couple of other python.org installers, for example, 3.8.7: double-clicking on additional .py files does not cause them to be opened in an active IDLE.ap on 10.15.7 but does on 11.1.

So, it looks like this really is an operating system (Launch Services?) issue in macOS 10.15 that has been changed/fixed in macOS 11. While there *might* be a way to programmatically workaround this within IDLE, Python, or Tk on 10.15, so far we haven't found one. And there is a fairly simple workaround on 10.15: just use the IDLE File -> Open menu item or keyboard shortcut (cmd-O).  It's not as elegant if you are used to double-clicking but it works and realistically we are not going to see a change in 10.15 behavior from Apple.

I would appreciate any other confirmations of this behavior or any ideas for a workaround. Barring the latter, I think we should probably just close this issue, unfortunately, as an OS bug.



Now just to make things a bit more complicated - sigh: I also tested with the recent python.org installer for the 3.10.0a4 pre-release. The principal difference between the 3.9.1 and 3.10.0a4 versions I tested with is that the 3.9.1 is linked with Tk 8.6.10 while 3.10.0a4 is linked with the just-released Tk 8.6.11. On macOS 11 Big Sur, there is one noticeable difference in behavior between the two. With the macOS 11 Big Sur / 3.10.0a4 / 8.6.11 combo, when double-clicking on a .py file without IDLE.app being active, a message window appears saying that the application cannot open Python Script files but does launch IDLE.app. With IDLE.app now active, double-clicking again on the same file then does cause the file to be opened in an edit window of the active IDLE as expected and double-clicking on other .py files then open edit windows for them as expected. Without more detailed investigation, this appears to be a minor problem (possibly a change in Tk) unrelated to those in this issue other than that it involves double-clicking on .py files but I thought I should mention it here in case someone runs into it before it is resolved.
History
Date User Action Args
2021-01-05 22:04:41ned.deilysetrecipients: + ned.deily, terry.reedy, ronaldoussoren, IrvKalb, RM, AndrewGYork, alftheelf
2021-01-05 22:04:41ned.deilysetmessageid: <1609884281.82.0.445868928795.issue38946@roundup.psfhosted.org>
2021-01-05 22:04:41ned.deilylinkissue38946 messages
2021-01-05 22:04:41ned.deilycreate