SIGN IN SIGN UP

bpo-46417: Fix race condition on setting type __bases__ (GH-30788)

Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
V
Victor Stinner committed
f1c6ae3270913e095d24ae13ecf96f5a32c8c503
Parent: c8a5366
Committed by GitHub <noreply@github.com> on 1/22/2022, 2:08:42 PM