[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

Serhiy Storchaka report at bugs.python.org
Fri Oct 30 12:38:08 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am not sure that its all the same issue. There may be several different issues:

* Issue39513. Logging fails with confusing traceback when called late at shutdown. I think that if logging cannot work at this stage it should either do nothing or emit a warning.

* Issue26789. asyncio creates reference loops which caused to executing code late at shutdown, and that code uses logging which always fail. It would be better to avoid creating reference loops, and if it is impossible, break the earlier.

* Issue42203. And there may be different issue in asyncio tests. Tests should clean up after them and do not leave the code be executed later. It may be the same as issue26789, but tests can make additional efforts to clean up.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26789>
_______________________________________


More information about the Python-bugs-list mailing list