[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

Ivan Levkivskyi report at bugs.python.org
Thu Feb 23 18:47:47 EST 2017


New submission from Ivan Levkivskyi:

This command:

./python -c 'import runpy, typing; runpy.run_module("test")' -R 5:5 test_collections

Sometimes gives spurious failures like this:

test_collections leaked [0, 0, 3, -3, 3] memory blocks, sum=3

I think this is because ABC caches of typing.ChainMap, typing.Counter, and typing.DefaultDict are not cleared by refleak.py/dash_R_cleanup (presumably because inspect.isabstract returns False on those)

Adding a manual clean-up of these cashes to cleanup_cashes() fixes the "leak".

----------
assignee: levkivskyi
components: Tests
messages: 288495
nosy: gvanrossum, levkivskyi
priority: normal
severity: normal
status: open
title: Spurious failures in test_collections in releak hunting mode after typing is imported
type: resource usage

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29638>
_______________________________________


More information about the Python-bugs-list mailing list