bpo-46417: Revert remove_subclass() change (GH-30750)

remove_subclass() doesn't clear the tp_subclasses dict if the dict
becomes empty.
This commit is contained in:
Victor Stinner 2022-01-21 16:45:14 +01:00 committed by GitHub
parent 595225e86d
commit fda8886498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -6553,10 +6553,6 @@ remove_subclass(PyTypeObject *base, PyTypeObject *type)
PyErr_Clear();
}
Py_XDECREF(key);
if (PyDict_Size(dict) == 0) {
Py_CLEAR(base->tp_subclasses);
}
}
static void