bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264)
Heap types now always visit the type in tp_traverse. See added docs for details.
This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f.
Automerge-Triggered-By: @encukou
diff --git a/Modules/_abc.c b/Modules/_abc.c
index 434bc45..709b52f 100644
--- a/Modules/_abc.c
+++ b/Modules/_abc.c
@@ -46,6 +46,7 @@
static int
abc_data_traverse(_abc_data *self, visitproc visit, void *arg)
{
+ Py_VISIT(Py_TYPE(self));
Py_VISIT(self->_abc_registry);
Py_VISIT(self->_abc_cache);
Py_VISIT(self->_abc_negative_cache);