From: Victor Stinner Date: Fri, 15 Sep 2023 00:07:28 +0000 (+0200) Subject: [3.11] gh-108822: Fix regrtest clear_caches() (#109432) X-Git-Tag: v3.11.6~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a20797056173b4628b5e23d2122a665ad7f5ee5;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-108822: Fix regrtest clear_caches() (#109432) gh-108822: Fix regrtest clear_caches() Python 3.11 doesn't have fractions._hash_algorithm cache. --- diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py index bb64f997d350..751dc04384da 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.