[issue2216] Problems using logging module with idle

Andrea Griffini report at bugs.python.org
Mon Mar 3 12:44:01 CET 2008


Andrea Griffini added the comment:

I thougt it was a bug because when calling close() handlers are removed
from some data structure (the global dictionary and the global list) but
they're left inside the loggers they're attached to. Now I understand
that this is a responsibility of who attached the handler; probably my
patch would break or just behave differently with code that already
managed to remove logging handlers from loggers explicitly or that
relied on the fact that even a "closed" handler can still be notified.

Having the logging module to work correctly in IDLE and other
environments that keep a running instance of the interpreter provided
that shutdown is called would have been just a lucky nice side effect of
"fixing" handler.close (of course those IDEs will still have potential
problems with any module that keeps an internal state).

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2216>
__________________________________


More information about the Python-bugs-list mailing list