Skip to content

Commit fda8886

Browse files
authored
bpo-46417: Revert remove_subclass() change (GH-30750)
remove_subclass() doesn't clear the tp_subclasses dict if the dict becomes empty.
1 parent 595225e commit fda8886

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Objects/typeobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6553,10 +6553,6 @@ remove_subclass(PyTypeObject *base, PyTypeObject *type)
65536553
PyErr_Clear();
65546554
}
65556555
Py_XDECREF(key);
6556-
6557-
if (PyDict_Size(dict) == 0) {
6558-
Py_CLEAR(base->tp_subclasses);
6559-
}
65606556
}
65616557

65626558
static void

0 commit comments

Comments
 (0)