From bc3a770febdd414c16499d7d7711420a2674e313 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 10 Nov 2023 13:22:01 +0100 Subject: [PATCH] gh-111929: Fix regrtest clear_caches() Python 3.11 doesn't have the fractions._hash_algorithm.cache_clear() function. --- Lib/test/libregrtest/utils.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py index f6de62af1f0ed5..25f3e853137316 100644 --- a/Lib/test/libregrtest/utils.py +++ b/Lib/test/libregrtest/utils.py @@ -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.