]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41718: Reduce libregrtest runtest imports (GH-24980)
authorVictor Stinner <vstinner@python.org>
Mon, 22 Mar 2021 23:17:05 +0000 (00:17 +0100)
committerGitHub <noreply@github.com>
Mon, 22 Mar 2021 23:17:05 +0000 (00:17 +0100)
commit10417dd15f135c179cf4234d1abe506915d802ff
tree52f4ff03b33cfae7565f0eed5f0dd0dff188c5d4
parent532e063fc2bf9e6e80550670ddc5dc5d2b1d2450
bpo-41718: Reduce libregrtest runtest imports (GH-24980)

Move clear_caches() from libregrtest.refleak to libregrtest.utils to
avoid importing libregrtest.refleak when it's not needed.

clear_caches() now only calls re.purge() if 're' is in sys.modules.
Lib/test/libregrtest/refleak.py
Lib/test/libregrtest/runtest.py
Lib/test/libregrtest/utils.py