[issue20599] test_cleanup() of test_builtin failed

Serhiy Storchaka report at bugs.python.org
Wed Feb 12 20:42:19 CET 2014


Serhiy Storchaka added the comment:

> I (hope I) fixed the test, but in fact, the test showed another bug: print() cannot be used during Python exit in destructor. It means for example that Python may not be able to display errors at exit.

print() can be used during Python exit in destructor if destructor called before cleaning up the builtins and sys modules and encoding module with the encoding of sys.stdout.

Cleaning up the builtins and sys modules are delayed after wiping other modules, this decreases the chance of print() failure.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20599>
_______________________________________


More information about the Python-bugs-list mailing list