Skip to content

Commit

Permalink
gh-103193: Fix refleaks in test_inspect and test_typing (#104320)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored May 9, 2023
1 parent 41aff46 commit 9196da4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/libregrtest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ def clear_caches():
else:
fractions._hash_algorithm.cache_clear()

try:
inspect = sys.modules['inspect']
except KeyError:
pass
else:
inspect._shadowed_dict_from_mro_tuple.cache_clear()


def get_build_info():
# Get most important configure and build options as a list of strings.
Expand Down

0 comments on commit 9196da4

Please sign in to comment.