From feaac85481dc493b904382c6782a8db40f0438c6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 Sep 2023 01:42:27 +0200 Subject: [PATCH] gh-108822: Fix regrtest clear_caches() Python 3.11 doesn't have fractions._hash_algorithm cache. --- 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 bb64f997d3500a..751dc04384da06 100644 --- a/Lib/test/libregrtest/utils.py +++ b/Lib/test/libregrtest/utils.py @@ -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.