]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-108822: Fix regrtest clear_caches() (#109432)
authorVictor Stinner <vstinner@python.org>
Fri, 15 Sep 2023 00:07:28 +0000 (02:07 +0200)
committerGitHub <noreply@github.com>
Fri, 15 Sep 2023 00:07:28 +0000 (00:07 +0000)
gh-108822: Fix regrtest clear_caches()

Python 3.11 doesn't have fractions._hash_algorithm cache.

Lib/test/libregrtest/utils.py

index bb64f997d3500ade0eb71d300590c123ba2eb964..751dc04384da06c92cc0384cca067fb48e83025d 100644 (file)
@@ -212,13 +212,6 @@ def clear_caches():
         for f in typing._cleanups:
             f()
 
-    try:
-        fractions = sys.modules['fractions']
-    except KeyError:
-        pass
-    else:
-        fractions._hash_algorithm.cache_clear()
-
 
 def get_build_info():
     # Get most important configure and build options as a list of strings.