]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44895: libregrtest: refleak check clears types later (GH-28113)
authorVictor Stinner <vstinner@python.org>
Wed, 1 Sep 2021 15:45:27 +0000 (17:45 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Sep 2021 15:45:27 +0000 (17:45 +0200)
commit679cb4781ea370c3b3ce40d3334dc404d7e9d92b
treeded25a0c00d4b1be1af5cb8a585de51bf5fad3be
parent863154c9292e70c5a8a1a3f22ef4ee42e2304281
bpo-44895: libregrtest: refleak check clears types later (GH-28113)

libregrtest now clears the type cache later to reduce the risk of
false alarm when checking for reference leaks. Previously, the type
cache was cleared too early and libregrtest raised a false alarm
about reference leaks under very specific conditions.

Move also support.gc_collect() outside clear/cleanup functions to
make the garbage collection more explicit.

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Lib/test/libregrtest/refleak.py
Lib/test/libregrtest/runtest.py
Lib/test/libregrtest/utils.py
Misc/NEWS.d/next/Tests/2021-09-01-17-17-44.bpo-44895.kV7H77.rst [new file with mode: 0644]