[issue32231] -bb option should override -W options

2019-05-14 Thread STINNER Victor
Change by STINNER Victor : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mail

[issue32231] -bb option should override -W options

2017-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue20361. -- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options _

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: One potential complication here is that embedding applications would inherit the requirement to do both: Py_BytesWarningFlag = 2; and PySys_AddWarnOption(L"error::BytesWarning"); to request errors. That's probably OK though, since we're getting into p

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan 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 definite

[issue32231] -bb option should override -W options

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: IMHO the root issue is that there are different options which set warnings filters: - PYTHONWARNINGS/-W will fill sys.warnoptions - sys.flags.bytes_warning (-b, -bb) and sys.flags.dev_mode (-X dev, PYTHONDEVMODE=1) which change the default filters vstinner@a

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: (From the discussion at https://bugs.python.org/issue32230#msg307721) Another benefit we'd gain from this approach is that we could easily omit the filter entirely in the case where neither -b nor -bb is set: in those situations, BytesWarning won't be emitted a

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
New submission from Nick Coghlan : 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 wa