New submission from Florent Xicluna <la...@yahoo.fr>: Currently this context manager is used in 3 different situations: - to silence standard warnings - to record warnings in a list, in order to verify them - to silence py3k warnings
But it does not accept any parameter, and it does not *check* if the filter is obsolete. It silence *all* warnings, blindly. I would like to propose an enhancement of this function, which accepts a list of filters as parameters, and which verifies that there's really something to catch. An optional boolean argument "lazy" can be used to disable the check. check_warnings([filter[, ...[, lazy=False]]]) Additionnally, a sister function will filter only the py3k warnings: check_py3k_warnings([filter[, ...[, lazy=False]]]) See the patch and its docstring for details. Note: this context manager could be used to fix the last part of #7092 ---------- components: Tests messages: 98796 nosy: ezio.melotti, flox priority: high severity: normal status: open title: Improve "test_support.check_warnings()" type: feature request versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7849> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com