]> granicus.if.org Git - python/commit
bpo-32089: Fix warnings filters in dev mode (#4482)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 21 Nov 2017 01:32:40 +0000 (17:32 -0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2017 01:32:40 +0000 (17:32 -0800)
commit09f3a8a1249308a104a89041d82fe99e6c087043
tree2d494c186b4aadfb6fe630f8ac9fc7e66e1906f5
parentf39b674876d2bd47ec7fc106d673b60ff24092ca
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.
Doc/using/cmdline.rst
Include/pystate.h
Lib/subprocess.py
Lib/test/test_cmd_line.py
Lib/warnings.py
Modules/main.c
Python/_warnings.c