[issue44895] refleak test failure in test_exceptions

Irit Katriel report at bugs.python.org
Tue Aug 17 06:50:19 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

However, if I replace the assignment with a gc.collect() call, it still leaks:

def test_no_hang_on_context_chain_cycle2():
    while gc.collect():
        pass
    class A(Exception):
        pass
    class B(Exception):
        pass
    ...


I also changed gc_collect in Lib/test/support/__init__.py (which is called by the refleak check) to loop until gc.collect() returns 0 (currently it calls gc.collect() 3 times).  Still leaks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44895>
_______________________________________


More information about the Python-bugs-list mailing list