I had the inheritance cycle stuff backwards.  Oops!
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index f77d6a4..dde165d 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3452,6 +3452,7 @@
         pass
     d = D()
     e = E()
+    D.__bases__ = (C,)
     D.__bases__ = (C2,)
     vereq(d.meth(), 1)
     vereq(e.meth(), 1)
@@ -3492,6 +3493,13 @@
         # actually, we'll have crashed by here...
         raise TestFailed, "shouldn't be able to create inheritance cycles"
 
+    try:
+        D.__bases__ = (E,)
+    except TypeError:
+        pass
+    else:
+        raise TestFailed, "shouldn't be able to create inheritance cycles"
+
     # let's throw a classic class into the mix:
     class Classic:
         def meth2(self):
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;
+			}
 		}
 	}