[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.
This commit is contained in:
Victor Stinner 2023-11-13 00:00:38 +01:00 committed by GitHub
parent 9536fe1656
commit aa3232db23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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.