Author vstinner
Recipients ncoghlan, vstinner
Date 2017-12-06.09:56:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512554185.43.0.213398074469.issue32230@psf.upfronthosting.co.za>
In-reply-to
Content
I was explicitly asked to not change the behaviour of BytesWarning with -X dev.

-X dev documentation doesn't menton -Wd/-Wdefault anymore:
https://docs.python.org/dev/using/cmdline.html#id5

"Warning filters: add a filter to display all warnings ("default" action), except of BytesWarning which still depends on the -b option, and use "always" action for ResourceWarning warnings. For example, display DeprecationWarning warnings."

Another implementation issue is subprocess._args_from_interpreter_flags() which was unable to properly "rebuild" the -X dev option from sys.warnoptions. I mean that it's now simpler and safer with sys.flags.dev_mode.

But I agree that the fact that -X dev doesn't touch sys.warnoptions is surprising and can cause issues. IMHO sys.warnoptions shouldn't exist in the first place. It looks like a hack to pass options from the C main() function to the warnings initilization code. But it's not like we can remove it right now :-)
History
Date User Action Args
2017-12-06 09:56:25vstinnersetrecipients: + vstinner, ncoghlan
2017-12-06 09:56:25vstinnersetmessageid: <1512554185.43.0.213398074469.issue32230@psf.upfronthosting.co.za>
2017-12-06 09:56:25vstinnerlinkissue32230 messages
2017-12-06 09:56:25vstinnercreate