[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

2022-02-02 Thread Marc Culler
Marc Culler added the comment: The TKApplication class is a subclass of NSApplication which adds both attributes and methods. Those are used throughout the macOS port of Tk, and as Ronald says, the unique instance of NSApplication in Tk is actually a TKApplication. Every macOS Application

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-05 Thread Marc Culler
Marc Culler added the comment: Well, not exactly ... culler@abner ~ % export SYSTEM_VERSION_COMPAT=1 culler@abner ~ % sw_vers ProductName:Mac OS X ProductVersion: 10.16 BuildVersion: 20G224 culler@abner ~ % export SYSTEM_VERSION_COMPAT=0 culler@abner ~ % sw_vers

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-04 Thread Marc Culler
Marc Culler added the comment: According to wikipedia, it was only the Big Sur beta that identified itself as 10.16. (And I observed this with the beta). But the release and, I think, the later Big Sur betas stopped doing that. But I did eventually find a page showing a tweet

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-04 Thread Marc Culler
Marc Culler added the comment: Where do you think that "feature" is documented? -- ___ Python tracker <https://bugs.python.org/issue44828> ___ ___

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-02 Thread Marc Culler
Marc Culler added the comment: A (hypothetical) explanation: I think that each NSWindow maintains a queue of attached sheets. Failing to call the [parent endSheet] method left the file dialogue NSPanel in the queue, although it had been ordered offscreen and so was not visible. Opening

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-02 Thread Marc Culler
Marc Culler added the comment: OK. Shift-Command-S works. I will attach the fossil diff which should have enough context to indicate where to add the one new line. Then I will merge this change into the 8.6.12 release candidate -- Added file: https://bugs.python.org/file50420

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-02 Thread Marc Culler
Marc Culler added the comment: Yes that is what I meant. So I guess everything may be OK now. I did verify that the Tk demo can repeatedly open file save dialogs. When you press Command-S on a non-new edit window you do see the flash of the Save menu, so it would appear that a dialog

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-02 Thread Marc Culler
Marc Culler added the comment: I found the cause of the zombie dialog window. I was supposed to call [parent endSheet] after calling [parent beginSheet]. Adding that stops the window from reappearing. But it does not solve the whole problem. Subsequent Command-S presses do not cause

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-01 Thread Marc Culler
Marc Culler added the comment: Heads up! A strange Apple quirk has been identified which could affect the file dialog behavior if the Tk library is compiled on macOS 10.XX and used on macOS 11 or 12. (I am not sure if this applies here.) The fix for the broken file dialog was to use

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler
Marc Culler added the comment: That is great news! I will now merge the changes into the Tk core-8-6-branch and core-8-6-12-rc branches. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler
Marc Culler added the comment: Hi Ned. Here is one more attempt, hopefully the final one. I tested with IDLE on 10.14 (VM), 10.15(hard), 11(hard), 12(VM). I used Python 3.10.0. I replaced libtk8.6.dylib with the Tk lib compiled from the tip of the macosx_filedialog branch. I could

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler
Marc Culler added the comment: Hmmm, the 10.15 segfault seems to occur when writing the filename into the entry widget on the dialog. So maybe it is actually an issue with reference counting an NSString. I will have to look at that more carefully

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler
Marc Culler added the comment: Thanks for doing all the testing, Ned. I guess that the path forward is now clear. I will revert to the 8.6.11 code for 10.15 and earlier and use the new code for 11 and later. Of course the 8.6.11 code already has two cases, for 10.14 and earlier and 10.15

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-27 Thread Marc Culler
Marc Culler added the comment: Hi Ned, I think this problem is fixed now in the tip of the Tk macosx_filedialog branch. I am attaching the tkMacOSXDialog.c file from that branch. I think you should be able to just replace the version in 8.6.11 and be able to build a working version. I

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-27 Thread Marc Culler
Marc Culler added the comment: Thanks, Ned, for finding my mistake which you generously called a typo. I have fixed the inequality in the Tk fossil repository. Incidentally, there is now a core-8-6-12-rc branch of Tk, also containing the fix. So it should not be too long before 8.6.12

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler
Marc Culler added the comment: No, Apple is not going to do away with their NSOpenPanel. There is always some churn when they release a new OS. Subtle changes to APIs can occur with no warning and no documentation. Sometimes they are bugs. Sometimes they disappear when the OS is released

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler
Marc Culler added the comment: Hi Ronald, There is no calendar scheduling for Tk releases. Don Porter decides when they happen. But I think we are due for another one soonish. In case it doesn't happen before the next Python release I will attach the patch file for commit a32262e9

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler
Marc Culler added the comment: I was able to fix this problem for Tk on Monterey beta [21A5543b]. The fix has been committed to the tip of the core-8-6-branch in the Tk fossil repository. Here is a synopsis. Tk used to open the file dialog by calling [NSApp runModalForWindow:panel

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler
Marc Culler added the comment: Unfortunately, I am still seeing this failure in Monterey beta 9. However, we are no longer alone. Here is a report of the same issue in Android Studio: https://stackoverflow.com/questions/69068842/android-studio-open-file-operation-failed-the-open-file

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-06 Thread Marc Culler
Marc Culler added the comment: I should have mentioned that I tested on Intel hardware, not M1. I do not have access to an M1 Apple at this time. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-06 Thread Marc Culler
Marc Culler added the comment: I built Tcl and Tk 8.6 on Monterey beta (21A5294g) and I see this traceback in the Wish file dialog demo. Note that this is *not* an error. The file dialog works fine. This is a non-fatal NSInternalInconsistencyException which prints a traceback to stderr

[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-04 Thread Marc Culler
Marc Culler added the comment: Well, actually the release was announced today. There was one bug fix which did not make it into the release but could possibly affect Python, due to the fact that Python is installed as a framework, and frameworks to not have icons. I can supply a (1-line

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-12-28 Thread Marc Culler
Marc Culler added the comment: Hi Ned, I have a comment about the code signing issues that would arise if the Tcl and Tk frameworks were embedded as actual subframeworks inside the Python.framework, and a user later replaced those with newer versions. The answer is that no new issues arise

[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread Marc Culler
Marc Culler added the comment: Yes, I can provide a good commit ID to work with. Please give me a couple of days. The current tip is almost an ideal choice. There have been no Aqua bug reports for quite some time. But now there is one new one (from Kevin) so I'd like to fix

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-11-07 Thread Marc Culler
Marc Culler added the comment: Ned - do you have any news on the topic of packaging Tcl/Tk within the Python bundle? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-10-18 Thread Marc Culler
Marc Culler added the comment: Dear Ronald, You are correct that "It is already possible to replace the Tcl/Tk libraries by replacing the relevant files in Python.framework." I know that because I have done it. Moreover, having done it, I know that it is much more difficult than

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-10-18 Thread Marc Culler
Marc Culler added the comment: Dear Eric, I am aware that python is cross platform. The change that I am proposing would be almost entirely limited to the file: Mac/BuildScript/build-installer.py which is entirely mac-specific. It controls how the Mac installer is constructed

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-10-18 Thread Marc Culler
New submission from Marc Culler : Packaging Tcl and Tk within the python framework is a great idea and a big improvement. But the way it is being done is pretty crazy, and makes it unnecessarily difficult to upgrade the version of Tcl/Tk that python is using. That is something which should

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Marc Culler added the comment: One thing to keep in mind is that Apple's release of OSX 10.14.6 caused Tk 8.6.8 to stop working on many systems in an extremely obnoxious way. Starting a Tk Application would trigger a segfault in Apple's WindowServer which would then cause the user

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Change by Marc Culler : -- versions: +Python 2.7 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue38882> ___ ___ Python-bugs-list mailing list Unsub

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Marc Culler added the comment: I should have mentioned that I did not see the IDLE hang with Python 3, only with Python 2.7. So I changed the Version in the ticket. -- versions: +Python 3.7 -Python 3.8 ___ Python tracker <https://bugs.python.

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Marc Culler added the comment: It definitely makes sense for an on-screen window to have a transient dialog. With a little care (see "messages boxes" in the widget demo) on the mac the transient can be a "sheet" that opens from the top of the master window.

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-21 Thread Marc Culler
New submission from Marc Culler : The soon-to-be-released Tcl/Tk 8.6.10 includes some changes to the macOS port which cause the wm transient command to behave in the way that the Tk manual says it should: "A transient window will mirror state changes in the master and inherit the

[issue32931] Python 3.70b1 specifies non-existent compiler gcc++

2018-02-23 Thread Marc Culler
New submission from Marc Culler <cul...@math.uic.edu>: Compiling an external module in the 3.7.0b1 prerelease on macOS High Sierra failed for me because a compiler named "gcc++" was not found. As far as I can tell there is no such compiler in the current XCode releas

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-12 Thread Marc Culler
Marc Culler added the comment: The name of a Tk font family is a byte sequence obtained from the operating system. But, this being Python 2.7, there is no distinction between the str type and the bytes type. The byte sequence is definitely not ascii encoded on a Japanese Windows system

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-09 Thread Marc Culler
Marc Culler added the comment: The attached patch simply decodes string options to the Font._set() method using the utf8 codec. Other options (which will be numbers) are converted to ascii strings as currently happens. This makes it possible to use the Font.copy() method without raising

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler
Changes by Marc Culler <cul...@math.uic.edu>: Added file: http://bugs.python.org/file46851/JapanesePythonBug.png ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-08 Thread Marc Culler
New submission from Marc Culler: And that is a very bad assumption. On Windows 10 in the Japanese locale the default TkFixedFont has family u'\uff2d\uff33 \u30b4\u30b7\u30c3\u30af' (a transliteration of MS Gothic). The error occurs on line 51: 47 def _set(self, kw): 48

[issue29605] Python2.7-32 misreports architecture on macOS.

2017-02-20 Thread Marc Culler
New submission from Marc Culler: On macOS, the 32 bit python 2.7 reports its architecture as '64bit' in platform.architecture(). Note that the 32 bit Python versions 3.4, 3.5 and 3.6 all correctly report '32bit'. $ python-32 Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC

[issue28440] pip failures on macOS Sierra

2016-10-14 Thread Marc Culler
New submission from Marc Culler: Changes made to /Library/Python on macOSX Sierra cause the --with-ensurepip compiler flag to fail, and lead to failures of pip after installing Python. The new file that causes the problem on Sierra is: /Library/Python/2.7/site-packages/Extras.pth The current

[issue10731] UnicodeDecodeError in OS X tkinter when binding to MouseWheel

2012-08-02 Thread Marc Culler
Marc Culler added the comment: Thanks, Ned! It seems to be completely fixed by 8.5.12. -- nosy: +Marc.Culler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10731

[issue10731] UnicodeDecodeError in OS X tkinter when binding to MouseWheel

2011-07-24 Thread Marc Culler
Marc Culler cul...@math.uic.edu added the comment: I am running OSX 10.5.8 on this macbook. The Tcl/Tk package on the system is ActiveState Tcl/Tk 8.4.19. I just installed Python 3.2 (r32:88452, Feb 20 2011, 10:19:59) from http://www.python.org/getit/releases/3.2/ and I am still seeing

[issue10731] UnicodeDecodeError in OS X tkinter when binding to MouseWheel

2010-12-18 Thread Marc Culler
New submission from Marc Culler cul...@math.uic.edu: In OS X tkinter the two-finger scroll generates MouseWheel events. The following code: bug.py import tkinter def mouse_wheel(event): print('Mouse wheel event') tk = tkinter.Tk() list = tkinter.Listbox(tk) list.bind('MouseWheel

[issue6124] Tkinter should support the OS X zoom button

2009-05-27 Thread Marc Culler
New submission from Marc Culler cul...@math.uic.edu: As far as I can tell, no Tkinter event or pseudo event is generated by clicking the green zoom button on Mac OS X windows. This makes it impossible to support that OS X paradigm in a Tkinter application. I would like to be able to bind Zoom

[issue6015] Tkinter Scrollbar in OS X 10.5

2009-05-15 Thread Marc Culler
Marc Culler cul...@math.uic.edu added the comment: I have the same issues with Python 2.6 code I have written. In OS X 10.4 the scrollbars work correctly with a Tkinter Text widget. The same code running in 10.5 exhibits this erratic behavior. It appears as though mouse movement events