Ned Deily added the comment:

This is an instance of the problems identified in Issue21882, namely that 
test___all__ is importing turtledemo modules and some of them have bad side 
effects. In this case, it's turtledemo.clock which is calling mode() which now 
unconditionally attempts to create a Tk window during the import. That means Tk 
is being called without being subject to the checks of 
test_support.requires('gui'). One of the reasons for having that check is to 
prevent this kind of crash (as documented in Issue8716) in Tk when Tk is 
invoked in a process that cannot make a window manager connection, as when 
running under a buildbot with a user name that is not logged in as the main gui 
user.  Note also that when Tk crashes, there is nothing the Python code can 
really do to recover from it.  The solution is as outlined in #21882: don't 
unconditionally call mode() in the import path.

----------
assignee: ronaldoussoren -> 
components:  -Macintosh
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> turtledemo modules imported by test___all__ cause side effects 
or failures

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

Reply via email to