From 21c7730761e2a768e33b89b063a095d007dcfd2c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 27 Nov 2017 12:11:55 +0100 Subject: 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. --- Lib/warnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/warnings.py') diff --git a/Lib/warnings.py b/Lib/warnings.py index 5b62569c97..c4bb22ec92 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) -- cgit v1.2.1