Message390103
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()`). |
|
Date |
User |
Action |
Args |
2021-04-02 21:55:37 | taldcroft | set | recipients:
+ taldcroft, pitrou, Gerrit.Holl, erik.bray, serhiy.storchaka, Segev Finer |
2021-04-02 21:55:37 | taldcroft | set | messageid: <1617400537.44.0.0955301643598.issue29672@roundup.psfhosted.org> |
2021-04-02 21:55:37 | taldcroft | link | issue29672 messages |
2021-04-02 21:55:37 | taldcroft | create | |
|