mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
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:
parent
c172fc5031
commit
21c7730761
4 changed files with 10 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue