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.
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 @@
# 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)