Tom Aldcroft <taldcr...@gmail.com> added the comment:

I encountered this issue today and want to +1 getting some attention on this.

The disconnected nature of this issue makes it especially difficult to 
understand -- any package in the stack can change this hidden global variable 
`_filters_version` in the warnings module that then impacts the local behavior 
of warnings in the user script.

The only way I was able to finally understand that an update to an obscure 
dependency was breaking our regression testing was by reading the `warnings` 
source code and then monkey patching it to print diagnostic information.

Even a documentation update would be useful. This could explain not only 
`catch_warnings()`, but in general the unexpected feature that if any package 
anywhere in the stack sets a warning filter, then that globally resets whether 
a warning has been seen before (via the call to `_filters_mutated()`).

----------
nosy: +taldcroft
versions:  -Python 3.5, Python 3.6, Python 3.7

_______________________________________
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

Reply via email to