Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Sep 14, 2023

Python 3.11 doesn't have fractions._hash_algorithm cache.

Python 3.11 doesn't have fractions._hash_algorithm cache.
@vstinner
Copy link
MemberAuthor

Without this change, ./python -m test test_buffer -R 3:3 fails with:

test test_buffer crashed -- Traceback (most recent call last): File "/home/vstinner/python/3.11/Lib/test/libregrtest/runtest.py", line 391, in _runtest_env_changed_exc _load_run_test(result, ns) File "/home/vstinner/python/3.11/Lib/test/libregrtest/runtest.py", line 351, in _load_run_test regrtest_runner(result, test_func, ns) File "/home/vstinner/python/3.11/Lib/test/libregrtest/runtest.py", line 306, in regrtest_runner refleak, test_result = dash_R(ns, result.test_name, test_func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/vstinner/python/3.11/Lib/test/libregrtest/refleak.py", line 87, in dash_R dash_R_cleanup(fs, ps, pic, zdc, abcs) File "/home/vstinner/python/3.11/Lib/test/libregrtest/refleak.py", line 182, in dash_R_cleanup clear_caches() File "/home/vstinner/python/3.11/Lib/test/libregrtest/utils.py", line 220, in clear_caches fractions._hash_algorithm.cache_clear() ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'fractions' has no attribute '_hash_algorithm' test_buffer failed (uncaught exception) 

@vstinnervstinner enabled auto-merge (squash) September 14, 2023 23:44
@vstinnervstinner merged commit 7a20797 into python:3.11Sep 15, 2023
@vstinnervstinner deleted the regrtest_refleak_311 branch September 15, 2023 00:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vstinner