Florent Xicluna added the comment: Much simpler:
$ ./python -Wd import warnings import sys saved = warnings.filters.copy() del sys.modules['warnings'] import warnings assert warnings.filters != saved assert warnings.filters.pop(0) = warnings.filters[0] assert warnings.filters == saved Explanation: the "default" filter is duplicated on each reload of the warnings module. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18383> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com