bpo-44895: libregrtest: refleak check clears types later by vstinner · Pull Request #28113 · python/cpython

@vstinner @iritkatriel

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>

iritkatriel

sakibguy added a commit to sakibguy/cpython that referenced this pull request

Sep 2, 2021
bpo-44895: libregrtest: refleak check clears types later (pythonGH-28113)