summaryrefslogtreecommitdiffstats
path: root/Lib/warnings.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-27 11:11:55 (GMT)
committerGitHub <noreply@github.com>2017-11-27 11:11:55 (GMT)
commit21c7730761e2a768e33b89b063a095d007dcfd2c (patch)
tree1d96b9b8c87ed00337e15d2a8c1f287fac4ffcb1 /Lib/warnings.py
parentc172fc5031a4035986bef0b2fcef906706d7abf3 (diff)
downloadcpython-21c7730761e2a768e33b89b063a095d007dcfd2c.zip
cpython-21c7730761e2a768e33b89b063a095d007dcfd2c.tar.gz
cpython-21c7730761e2a768e33b89b063a095d007dcfd2c.tar.bz2
bpo-32089: Use default action for ResourceWarning (#4584)
In development and debug mode, use the "default" action, rather than the "always" action, for ResourceWarning in the default warnings filters.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r--Lib/warnings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index 5b62569..c4bb22e 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -540,7 +540,7 @@ if not _warnings_defaults:
# resource usage warnings are enabled by default in pydebug mode
if dev_mode or py_debug:
- resource_action = "always"
+ resource_action = "default"
else:
resource_action = "ignore"
simplefilter(resource_action, category=ResourceWarning, append=1)