]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-111929: Fix regrtest clear_caches() (#111949)
authorVictor Stinner <vstinner@python.org>
Sun, 12 Nov 2023 23:00:38 +0000 (00:00 +0100)
committerGitHub <noreply@github.com>
Sun, 12 Nov 2023 23:00:38 +0000 (00:00 +0100)
gh-111929: Fix regrtest clear_caches()

Python 3.11 doesn't have the fractions._hash_algorithm.cache_clear()
function.

Lib/test/libregrtest/utils.py

index f6de62af1f0ed5dcbd5c5f00bd25e705fcb8124d..25f3e853137316741fcefd357d75cbb0ec53a2f1 100644 (file)
@@ -272,13 +272,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.