mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
This commit is contained in:
parent
3ea7b41b58
commit
908caac52e
8 changed files with 55 additions and 0 deletions
|
|
@ -709,6 +709,9 @@ def dash_R_cleanup(fs, ps, pic, abcs):
|
|||
sys.path_importer_cache.clear()
|
||||
sys.path_importer_cache.update(pic)
|
||||
|
||||
# clear type cache
|
||||
sys._cleartypecache()
|
||||
|
||||
# Clear ABC registries, restoring previously saved ABC registries.
|
||||
for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]:
|
||||
if not issubclass(abc, _Abstract):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue