mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-32230: Set sys.warnoptions with -X dev (#4820)
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. Patch written by Nick Coghlan, with minor modifications of Victor Stinner.
This commit is contained in:
parent
b748e3b258
commit
747f48e2e9
12 changed files with 224 additions and 124 deletions
|
@ -327,3 +327,6 @@ whatsnew/changelog,,:end,str[start:end]
|
|||
library/binascii,,`,'`'
|
||||
library/uu,,`,'`'
|
||||
whatsnew/3.7,,`,'`'
|
||||
whatsnew/3.7,,::,error::BytesWarning
|
||||
whatsnew/changelog,,::,error::BytesWarning
|
||||
whatsnew/changelog,,::,default::BytesWarning
|
||||
|
|
|
Loading…
Add table
Add a link
Reference in a new issue