summaryrefslogtreecommitdiffstats
path: root/Include/pystate.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-21 01:32:40 (GMT)
committerGitHub <noreply@github.com>2017-11-21 01:32:40 (GMT)
commit09f3a8a1249308a104a89041d82fe99e6c087043 (patch)
tree2d494c186b4aadfb6fe630f8ac9fc7e66e1906f5 /Include/pystate.h
parentf39b674876d2bd47ec7fc106d673b60ff24092ca (diff)
downloadcpython-09f3a8a1249308a104a89041d82fe99e6c087043.zip
cpython-09f3a8a1249308a104a89041d82fe99e6c087043.tar.gz
cpython-09f3a8a1249308a104a89041d82fe99e6c087043.tar.bz2
bpo-32089: Fix warnings filters in dev mode (#4482)
The developer mode (-X dev) now creates all default warnings filters to order filters in the correct order to always show ResourceWarning and make BytesWarning depend on the -b option. Write a functional test to make sure that ResourceWarning is logged twice at the same location in the developer mode. Add a new 'dev_mode' field to _PyCoreConfig.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 4401225..2081ff5 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -33,6 +33,7 @@ typedef struct {
int faulthandler;
int tracemalloc; /* Number of saved frames, 0=don't trace */
int importtime; /* -X importtime */
+ int dev_mode; /* -X dev */
} _PyCoreConfig;
#define _PyCoreConfig_INIT \
@@ -43,7 +44,8 @@ typedef struct {
.allocator = NULL, \
.faulthandler = 0, \
.tracemalloc = 0, \
- .importtime = 0}
+ .importtime = 0, \
+ .dev_mode = 0}
/* Placeholders while working on the new configuration API
*