This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan, vstinner
Date 2017-12-06.11:12:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm hesitant to put the *true* default filters in sys.warnoptions, as folks use "bool(sys.warnoptions)" as a check for "Were any warning options set via the environment or the command line?", and we don't want to invalidate that use case.

However, I'm definitely a fan of having the warnings module *only* look at sys.warnoptions, and requiring *all* command line options to route their filter settings through that channel. adjusts "-X dev" to work that way, and I'm suggesting we do the same here for "-b".

That way, we can fully define the relative ordering of PYTHONWARNINGS, "-X dev", "-W", and "-b" inside pymain_add_warnings_options (and only the true default filters will be appended by the warnings module itself).
Date User Action Args
2017-12-06 11:12:25ncoghlansetrecipients: + ncoghlan, vstinner
2017-12-06 11:12:24ncoghlansetmessageid: <>
2017-12-06 11:12:24ncoghlanlinkissue32231 messages
2017-12-06 11:12:24ncoghlancreate