Terry J. Reedy <tjre...@udel.edu> added the comment:

When I say that I am 99% sure that this is not an IDLE issue at all, I mean 
that I am 99% sure that a non-IDLE tkinter program registered as a working 
double-click handler in Mohave will not be properly invoked in Catalina.  A 
counter-example might suggest a possible fix for IDLE.

Likewise, doubt that this is a tkinter issue means that I suspect that a 
working .tcl Mohave double click handler would fail in Catalina.  A 
counterexample would suggest looking at tkinter/__init__.py and  _tkiter.py.  
For example, #40452 was opened as a Windows-specific IDLE failure, with a PR.  
However, Tal Einat discovered that a) the same problem existed on macOS, b) a 
4-line tkinter program also failed, c) a 4-line .tcl program worked, and d) on 
exit, tcl calls code that is no longer called in _tkinter, during python exit 
(after python was partly torn down).  We expect to fix the issue by calling a 
narrower acting tcl function before python exit.

IDLE opens existing files with idlelib.filelist.FileList.open.  It gets 
filenames from the os command line, the tk open file dialog, IDLE's Open Module 
dialog and Path Browser, and its Recent Files list.  I don't know how an OS 
file manager passes a filename to this function in a particular process, but I 
imaging that the GUI framework, the IDLE icon, and the double-click 
registration information may all be involved.  (On both Windows and macOS, 
double clicks to not open the file in an existing IDLE opened from a command 
line.) Anyway, here is an easy experiment with IDLE itself that someone should 
do on Catalina.

Open x.y Shell an IDLE icon (not the command line).
File => OpenModule idlelib.filelist
At the top of the open() body, after 'def open(self, filename,...)' add
        tkMessageBox.showerror('', filename, master=self.root)
Save and close the editor and shell (*required*).
Open x.y Shell from the same IDLE icon.  It will import the revised filelist 
module.
Open a file from within IDLE.  A message box appears with the full path and an 
[OK] button.  Click the button and the new editor window appears.
Double-click a file in Finder.  For me, on Mohave, the same thing happens as 
above.  I expect that on Catalina, there is no message box, indicating that 
IDLE's file open function is not called.  If I am wrong, check the displayed 
path and move the debug line down to find where execution stops.

----------
priority: critical -> normal

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to