Nick Coghlan <ncogh...@gmail.com> added the comment:

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.

https://bugs.python.org/issue32230 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).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32231>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to