This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
warn_explicit(message, category, filename, lineno, module, registry)
The regular warn() call calculates a bunch of values and calls
warn_explicit() with these.
This will be used to issue better syntax warnings.
appends to list of filters instead of inserting at the front. This
is useful to add a filter with a lower priority than -W options.
- Cosmetic improvements to a docstring and an error message.