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 <rep...@bugs.python.org> <http://bugs.python.org/issue20599> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com