[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

Thomas Gläßle report at bugs.python.org
Sat Oct 27 10:10:48 EDT 2018


Thomas Gläßle <thomas at coldfix.de> added the comment:

Hi, thanks for the consideration!

Is there any reason to introduce different behaviour than with filterwarnings here? This increases the number of things to remember - and except for the dot regex syntax doesn't interfere with module names, so there is no big drawback here either.

More importantly, my main use case for filterwarnings would be to select/ignore warnings based on module *or package* name. With the current interpretation as exact module name, you have to list all submodules in advance, which is quite inhibiting.

I have fixed the `[.*]` bogus example in the PR.

Best, Thomas

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34624>
_______________________________________


More information about the Python-bugs-list mailing list