Ned Deily <n...@python.org> added the comment:

Marc, thanks for providing the patch for Tk. There are some issues with it, 
though, at least when used with IDLE. I built a Python 3.10.0+ universal2 
installer, like what we provide on python.org, with just the updated Tk and 
tested it on macOS 10.9, 10.13, 10.14, 10.15, 11 and 12.

First, and most important, there seems to be a typo in the fix that causes the 
dialog panel to break on macOS 10.14: 

-       if ([NSApp macOSVersion] > 101400) {
+       if ( osVersion >= 101400 && osVersion < 120000) {

That ">=" should be just an ">" as before, I think. At least, making that 
change unbreaks 10.14.

Second, while the filedialog panel now works on macOS 12 (Monterey) with the 
patch, there are some side effects, at least when using CMD-S (Save) in a new 
IDLE edit window. After pressing CMD-S, some small object appears on the screen 
very briefly (too quickly for me to recognize what it is) and then the expected 
Save filedialog panel appears; however, unlike on all the other operating 
system levels tested, the keyboard focus is not on the filename text field in 
the panel. So when the user starts typing the file name, nothing happens until 
they do something, like clicking on the file name field, to manually move the 
keyboard focus to that field. I think most users would find that confusing. I 
don't know if there's any way to change that, either in Tk, tkinter, or IDLE. 
But it does seem to be a regression. The same binaries work fine on all of the 
other macOS versions I tested.

Any ideas?

(Although it's not an IDLE bug, I've added IDLE to the components list since it 
is impacted by this issue.)

----------
assignee:  -> terry.reedy
components: +IDLE
nosy: +lukasz.langa, pablogsal, terry.reedy
priority: normal -> release blocker
title: Using tkinter.filedialog crashes on macOS Python 3.9.6 -> 
tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking 
IDLE saves
versions: +Python 3.11, Python 3.9

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

Reply via email to