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.
This commit is contained in:
Victor Stinner 2017-11-27 12:11:55 +01:00 committed by GitHub
parent c172fc5031
commit 21c7730761
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 21 deletions

View file

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