ConceptNet has Assertions, RawAssertions, and Ratings (among other models). The relationship looks like:
RawAssertion:
assertion = ForeignKey(Assertion, null=True)
Rating:
assertion = ForeginKey(Assertion)
Assertion:
canonical = ForeignKey(RawAssertion)
Deleting an Assertion runs into an infinite loop in CollectedObjects.ordered_keys. The second time through the loop, when dealing with model=Rating, it has no children, but we shouldn't be setting found=True, because there's still a cyclic dependency. We should be able to tell that because it's already in dealt_with.
I tried to come up with a test case for this, but I couldn't make it fail. You can certainly reproduce it by downloading ConceptNet? yourself.
Attached patch fixes the obvious problem by causing it to raise the CyclicDependency exception properly. By "fix", I mean it gets to the real problem: there's a cycle. Eventually we'll need to look at the null flags on the relations to figure out where to break the cycle, but that's a separate issue.