[New-bugs-announce] [issue32231] -bb option should override -W options

Nick Coghlan report at bugs.python.org
Wed Dec 6 05:43:15 EST 2017


New submission from Nick Coghlan <ncoghlan at gmail.com>:

When implementing the "-X dev" mode, Victor was asked to make it behave differently from "-Wd", such that "python -bb -X dev" would still raise errors for bytes comparisons.

I don't think making "-X dev" and "-Wd" inconsistent with each other is the right way to address that request. Instead, I think we should find a way to make "-bb" *always* take precedence over any supplied "-W" options.

One way to do that would be to adopt an approach similar to what I've proposed for "-X dev" in https://bugs.python.org/issue32230: instead of making the warnings module aware of the "-bb" setting, we'd instead adjust the initialisation code to inject "error::BytesWarning" into sys.warnoptions *after* all of the entries from environment variables and the command line.

----------
messages: 307717
nosy: ncoghlan, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: -bb option should override -W options
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32231>
_______________________________________


More information about the New-bugs-announce mailing list