I had the inheritance cycle stuff backwards. Oops!
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index a5779ef..82237c8 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -208,10 +208,12 @@
type->tp_name, ob->ob_type->tp_name);
return -1;
}
- if (PyType_IsSubtype(type, (PyTypeObject*)ob)) {
- PyErr_SetString(PyExc_TypeError,
- "a __bases__ item causes an inheritance cycle");
- return -1;
+ if (PyType_Check(ob)) {
+ if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "a __bases__ item causes an inheritance cycle");
+ return -1;
+ }
}
}