[issue4180] warnings.simplefilter("always") does not make warnings always show up
report at bugs.python.org
Thu Oct 23 00:52:15 CEST 2008
Brett Cannon <brett at python.org> added the comment:
On Wed, Oct 22, 2008 at 3:39 PM, Benjamin Peterson
<report at bugs.python.org> wrote:
> Benjamin Peterson <musiccomposition at gmail.com> added the comment:
> Oh, do we not consider __warningsregistry__ an implementation detail?
I guess you could view it that way. I just know I find it extremely
annoying for testing for the exact reasons JP mentions; it's
unexpected if you don't know about it.
If we made __warningsregistry__ about just recording what warnings
have been raised and not include filter information (which I what I
think you are suggesting) then it would still server its purpose,
albeit for probably a small performance penalty. Probably whomever
came up with it over-optimized and just didn't realize that it might
play havoc with testing.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list