New submission from Rémi Rampin:
warnings._processoptions is called very early, before site-packages are
enabled. Because of this, using a non-standard 'category' will almost certainly
fail with the message:
Invalid -W option ignored: invalid module name: '...'
The -W option would be a lot more useful if it could actually match
non-standard categories (it does, after all, pretend to support
modulename.classname).
I don't see any easy way of fixing this, other than initializing the warnings
module later or matching category names with the given string (and getting rid
of the import).
----------
components: Library (Lib)
messages: 228261
nosy: remram
priority: normal
severity: normal
status: open
title: -W option cannot use non-standard categories
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22543>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com