From: Victor Stinner Date: Sun, 12 Nov 2023 23:00:38 +0000 (+0100) Subject: [3.11] gh-111929: Fix regrtest clear_caches() (#111949) X-Git-Tag: v3.11.7~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa3232db23e0dabbabb0a1f8fc9bb20bf7ec68c9;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-111929: Fix regrtest clear_caches() (#111949) gh-111929: Fix regrtest clear_caches() Python 3.11 doesn't have the fractions._hash_algorithm.cache_clear() function. --- diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py index f6de62af1f0e..25f3e8531373 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.