[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-12-20 Thread Ned Deily


Ned Deily  added the comment:

@fxcoudert: If you are trying to link with the Apple-provided system Tcl and Tk 
frameworks, don't.  They have been seriously broken since macOS 10.7 and stuck 
at Tk 8.5.9. The only visible Apple action has been to deprecate them. Any 
Python on macOS that claims to support tkinter (and, hence, IDLE) *must* be 
able to link with, and preferably supply, newer versions of Tcl and Tk. And for 
use on current versions of macOS, that also means Tcl/Tk 8.6.x, not 8.5.x.

https://www.python.org/download/mac/tcltk/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-12-19 Thread FX Coudert


FX Coudert  added the comment:

Reported to Apple as FB8945560

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-12-19 Thread FX Coudert


FX Coudert  added the comment:

Hi, Homebrew developer here, we're seeing this with macOS 11.1 and I think it's 
not a python issue but an Apple's Tcl/Tk issue. The backtrace I have is:

0   libsystem_kernel.dylib  0x7fff2031f462 __pthread_kill + 10
1   libsystem_pthread.dylib 0x7fff2034d610 pthread_kill + 263
2   libsystem_c.dylib   0x7fff202a0720 abort + 120
3   Tcl 0x7fff6fe1eb55 Tcl_PanicVA + 398
4   Tcl 0x7fff6fe1ebd5 Tcl_Panic + 128
5   Tk  0x7fff6ff1ead5 TkpInit + 385
6   Tk  0x7fff6fe9e788 0x7fff6fe6d000 + 
202632
7   _tkinter.cpython-39-darwin.so   0x000102d2d701 Tcl_AppInit + 84
8   _tkinter.cpython-39-darwin.so   0x000102d289fa _tkinter_create + 975
9   org.python.python   0x0001027251bb 
cfunction_vectorcall_FASTCALL + 203
10  org.python.python   0x00010279cff3 call_function + 403
11  org.python.python   0x00010279a184 
_PyEval_EvalFrameDefault + 27452
12  org.python.python   0x00010279db3b _PyEval_EvalCode + 
1998
13  org.python.python   0x0001026f55d8 
_PyFunction_Vectorcall + 248
14  org.python.python   0x0001026f4e67 
_PyObject_FastCallDictTstate + 212
15  org.python.python   0x0001026f5891 
_PyObject_Call_Prepend + 139
16  org.python.python   0x00010273de96 slot_tp_init + 87
17  org.python.python   0x0001027376f7 type_call + 150
18  org.python.python   0x0001026f4fa3 _PyObject_MakeTpCall 
+ 266
19  org.python.python   0x00010279d027 call_function + 455
20  org.python.python   0x00010279a184 
_PyEval_EvalFrameDefault + 27452
21  org.python.python   0x00010279db3b _PyEval_EvalCode + 
1998
22  org.python.python   0x00010279356d PyEval_EvalCode + 79
23  org.python.python   0x0001027ce5b5 run_eval_code_obj + 
110
24  org.python.python   0x0001027cd9ad run_mod + 103
25  org.python.python   0x0001027cc9dc PyRun_StringFlags + 
182
26  org.python.python   0x0001027cc8e9 
PyRun_SimpleStringFlags + 69
27  org.python.python   0x0001027e3802 Py_RunMain + 425
28  org.python.python   0x0001027e40c1 pymain_main + 306
29  org.python.python   0x0001027e410f Py_BytesMain + 42

This seems confirmed by the fact that I can reproduce with Apple's own python:

$ /usr/bin/python3 
Python 3.8.2 (default, Nov  4 2020, 21:23:28) 
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> root = tkinter.Tk()
macOS 11 or later required !
zsh: abort  /usr/bin/python3

I will file a bug report with Apple.

--
nosy: +fxcoudert

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-28 Thread Christopher Snowhill


Christopher Snowhill  added the comment:

That command also crashes with the same error. And I already verified with 
otool -L on the tkinter shared object file that it does indeed link the 
/System/Library/Frameworks version of both Tcl and Tk.

In fact, if I remember correctly, Homebrew's entire stance is to import and 
build as little as possible, always preferring to link to system bundled 
frameworks, no matter what. Maybe they'll rethink this one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-28 Thread Ned Deily


Ned Deily  added the comment:

If Homebrew links against the Apple-supplied Tcl and Tk frameworks, which are 
in /System/Library/Frameworks, all bets are off as those are deprecated and 
hopelessly out-of-date versions of Tcl/Tk 8.5. If tkinter is linked to Tcl and 
Tk frameworks in /Library/Frameworks and there are Tcl and Tk frameworks there, 
those are not supplied by Apple; they are either installed by Homebrew from 
somewhere else (ActiveTcl or perhaps built from source). It can be confusing 
trying to determine which instance of Tcl or Tk tkinter is actually using at 
runtime on macOS.  The command:

python3.9 -m test.pythoninfo

will display the patch level of Tk in use.  There is some more detail of how it 
all works here: https://www.python.org/download/mac/tcltk/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-28 Thread Christopher Snowhill


Christopher Snowhill  added the comment:

Sorry about that. I didn't know that Big Sur support wasn't added until 
post-3.9.0. I'll check if Brew has a newer version now, and even if not, if I 
can install a Git version for testing.

Incidentally, the error is occuring inside either the Tk or Tcl frameworks, and 
it's not a version that Brew supplies. Like the system copies of Python 2 and 
3, Brew links its builds against the system Tcl and Tk frameworks, which appear 
to have some bugs in the beta.

Thanks for testing, though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-28 Thread Ned Deily


Ned Deily  added the comment:

I've installed the 11.1 beta (of 2020-11-17) on an Intel-64 virtual machine and 
installed and run the test suite for the recently released 3.9.1rc1 Universal2 
binaries from python.org. The tests, including tkinter tests, run similarly to 
how they do on 11.0.1. Further, as far as I can tell, there is no place within 
Python itself where such a message ("macOS 11 or later required !") is emitted; 
I did not search the Tcl or Tk sources since you didn't say which version is in 
use. Be aware that 3.9.1rc1 is the first official Python release that supports 
macOS 11 Big Sur so it may be that the brew version you were using has 
preliminary patches for Big Sur support that differ from the final versions. 
Depending what you are trying to do, you might want to use the python.org 
3.9.1rc1 or 3.9.1 final (when released) until there is a supported brew 
version. Or, as Ronald suggest, you may need to track down exactly what and how 
the brew recipes are building for Tcl, Tk, and Python.  Good luck!

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-28 Thread Christopher Snowhill


Christopher Snowhill  added the comment:

And I can't report it to Homebrew, either, since they refuse to acknowledge bug 
reports against beta versions of the OS. I guess I can bug them when 11.1 
becomes a stable release, by which time I'll probably be on 11.2.

I'll file Feedback with Apple, too, as they're more likely to actually know 
what's going on.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-27 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Note that a python installation created using 
Mac/BuildScript/build-instalelr.py works fine on macOS 11.0 (I haven't tested 
on 11.1 beta yet). This may be a problem with homebrew or the way it builds 
Python and/or Tcl/Tk.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-27 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

On macOS 11 the system version is reported as 11.x if the binary was build 
using Xcode 12, and as 10.16.x for older binaries.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-27 Thread Ned Deily


Change by Ned Deily :


--
components: +macOS -Tkinter
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-11-27 Thread Christopher Snowhill


New submission from Christopher Snowhill :

The Tkinter module, in a freshly built copy of Python 3.9 built by Brew, using 
the latest Xcode 12.3 command line tools, crashes on Big Sur 11.1 beta. It 
emits the following error:

macOS 11 or later required !

I believe I recently read on macOS developer documentation, there is a special 
behavior in the system version reporting now, possibly only taking effect in 
11.1 and newer. Basically, if you query the major version first, you'll get 11 
or higher. If you query the minor version first, it will switch on 
compatibility mode and start reporting either 10.15 or 10.16, I'm not terribly 
sure which, but it does lie and say it's running version 10.

--
components: Tkinter
messages: 381933
nosy: kode54
priority: normal
severity: normal
status: open
title: Python Tkinter crashes on macOS 11.1 beta
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com