_PyStaticType_Dealloc does not invalidate the type version tag and when the interpreter is reinitialized it still points to the old index. It should be cleared after the runtime finalization to avoid a rare case where there is a cache hit from the old index.
Found while working on https://github.com/python/cpython/actions/runs/4112993949/jobs/7098592004
Linked PRs
_PyStaticType_Deallocdoes not invalidate the type version tag and when the interpreter is reinitialized it still points to the old index. It should be cleared after the runtime finalization to avoid a rare case where there is a cache hit from the old index.Found while working on https://github.com/python/cpython/actions/runs/4112993949/jobs/7098592004
Linked PRs
_PyStaticType_Dealloc#101697_PyStaticType_Dealloc(GH-101697) #101722