Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
enable python -W with respect to PipDeprecationWarning #3455
After: (note warning is correctly ignored)
Default warning filters should be appended to the filter chain, to allow filters added by users via -W (et. al.) to have a chance to run. This has a problem when the Warnings are derived from DeprecationWarning. The docs state that the default behavior for DeprecationWarning is ignore. Appending to the filter chain won't change this. Since this isn't the desired behavior for PipDeprecationWarning, I believe it's incorrect to derive from this warning, albeit the names are similar.
Changing PipDeprecationWarning to derive directly from Warning allows the appended rule to be the default behavior, while also allowing rules prepended by users to have effect.
I really can't see where a test for this would fit into the current test suite. Suggestions are very welcome. I should assert that:
Well, I'd go with a
and for python2.7+, use