STINNER Victor <victor.stin...@gmail.com> added the comment:

The problem is not the function displaying the warning, but warnings registries 
(__warningregistry__) no?

The behaviour depends on the action of the filter matching the ResourceWarning 
warning:

* always: don't touch the registry => no leak
* ignore: add the key to registry => leak!
* another action: add the key to registry => leak!

The key is the tuple (text, category, lineno).

I understand why always doesn't touch the registry. But why does "ignore" 
action touch the registry? Not only the user will not see the message, but the 
memory will slowly grow in the background.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27535>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to