Segev Finer <segev...@gmail.com> added the comment:
Hmm, I originally missed the per module __warningregistry__... Need to read the code more closely... What should the behavior be? We can add a flag that will make all warning actions be "always" when catch_warnings is in effect. But that doesn't feel right with the way catch_warnings currently behaves or what is expected of it. Another idea would be to add a callback that is called whenever we set a module registry, allowing catch_warnings to backup the original registry of each module and restore them all on exit (Also the _onceregistry and _filters_version). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29672> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com