Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Dec 12, 2017

Rather than supporting dev mode directly in the warnings module, this
instead adjusts the initialisation code to add an extra 'default'
entry to sys.warnoptions when dev mode is enabled.

This ensures that dev mode behaves exactly as if -Wdefault had
been passed on the command line, including in the way it interacts
with sys.warnoptions, and with other command line flags like -bb.

Fix also bpo-20361: have -b & -bb options take precedence over any
other warnings options.

https://bugs.python.org/issue32230

Rather than supporting dev mode directly in the warnings module, this
instead adjusts the initialisation code to add an extra 'default'
entry to sys.warnoptions when dev mode is enabled.

This ensures that dev mode behaves *exactly* as if `-Wdefault` had
been passed on the command line, including in the way it interacts
with `sys.warnoptions`, and with other command line flags like `-bb`.

Fix also bpo-20361: have -b & -bb options take precedence over any
other warnings options.
@vstinner
Copy link
Member Author

This PR is the modified version of Nick's PR #4734, see my comment: #4734 (comment)

@vstinner vstinner merged commit 747f48e into python:master Dec 12, 2017
@vstinner vstinner deleted the xdev_warnoptions branch December 12, 2017 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants