[Python-ideas] A resources tracker ?
Tarek Ziadé
tarek at ziade.org
Tue Mar 18 22:19:06 CET 2014
Le 18/03/14 22:04, Nick Coghlan a écrit :
>
> ..
>
> You should be able to experiment with something based on tracemalloc
> (although it may require patching the io implementation or else
> installing a GC callback that looks for particular types).
>
We've played a little bit with Victor on this today, using his script
here: https://bitbucket.org/haypo/misc/src/tip/python/res_warn.py
That did not fully work - I still need to investigate, but that's the
general idea.
I suspect modifying ResourceWarning itself to track down things would
ensure we're not missing anything.
Cheers
Tarek
More information about the Python-ideas
mailing list