Gerrit Holl added the comment:
To clarify, this behaviour crosses module boundaries. So even if some piece of
code many layers deep buried in a module uses this context manager, it has
global consequences.
--
___
Python tracker
Gerrit Holl added the comment:
I suppose this is a consequence of the change in:
http://bugs.python.org/issue4180
and although I can see why the warnings filter would be reset when entering the
context manager, I don't think it is desirable to have side effects for modules
that are entirely
New submission from Gerrit Holl:
Entering the `catch_warnings` context manager is causing warnings to be printed
over and over again, rather than just once as it should. Without such a
context manager, the behaviour is as expected:
$ cat ./mwe.py
#!/usr/bin/env python3.5