Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-32230: Set sys.warnoptions with -X dev #4820

Merged
merged 1 commit into from Dec 12, 2017

Conversation

@vstinner
Copy link
Member

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

bpo-32230: Set sys.warnoptions with -X dev
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

This comment has been minimized.

Copy link
Member Author

commented Dec 12, 2017

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

4 checks passed

bedevere/issue-number Issue number 32230 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@vstinner vstinner deleted the vstinner:xdev_warnoptions branch Dec 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.