E. Paine <paineeli...@gmail.com> added the comment:

> ... would break any code that puts the interpreter in a non-main thread
Have people not been warned enough?! But seriously, looking anywhere on Google 
will scream at you to stop using using threads with tkinter, let alone having 
the interpreter in a thread.

I am not sure I agree with your statement that we would be keeping the 
interpreter exits, as that was only a 'fallback' if a delete was attempted in a 
thread. However, I agree with you that we should avoid breaking existing code 
where possible and so such a change shouldn't be added.

As for uncommenting CHECK_TCL_APPARTMENT in Tkapp_Dealloc, I looked at the 
blame and found that it was added as a comment:
https://github.com/python/cpython/commit/b5bfb9f38c786c3330b2d52d93b664588c42283dbecaus
I don't know the reason for adding it commented, but it is possible Martin 
couldn't find a situation in which it was required. My only problem with 
uncommenting it would be that I don't understand how the GC works. I suspect it 
would not be a problem, but if the error caused the GC to halt collecting, we 
would be in exactly the same situation (though I doubt this would be true).

> It should be done a bugfix regardless of anything else.
Agreed. Such a simple change to stop the interpreter crashing is definitely 
beneficial.

As for actually fixing the root of the problem, I suspect any of the changes 
you proposed, similar to mine, would be too controversial and not really go 
anywhere (being fairly large changes to fix just a handful of situations).

----------

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

Reply via email to