STINNER Victor added the comment:

It looks like the warnings is logged when the C implemention is used. When the 
Python implementation is used, "import linecache" or "linecache.getline()" 
fail, and so the warnings is skipped.

Attached patch makes the Python implementation safer when Python is shutting 
down. Add "try/except Exception" to ignore exceptions on import, linecache and 
tracemalloc.

----------
Added file: http://bugs.python.org/file42276/warnings_shutdown.patch

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

Reply via email to