#17014: prefetch_related infinite recursion by default managers -------------------------------------+------------------------------------- Reporter: akaariai | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.3 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 1 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by lukeplant):
* stage: Unreviewed => Accepted Comment: I've got a patch for this ticket which takes essentially the same approach you describe. It works for the tests your provided (though there were a bunch of errors in that diff I had to correct). I'm basically testing whether we've seen the descriptor object before, since that uniquely defines the relationship. It depends on my patch for #17003, though, so I will not post here. Although the test cases are very useful, I'm debating not including tests for this in Django itself, since the failure condition is bad and could effectively take down a developers machine or a build bot, and unit tests are a bad way to check for termination problems. -- Ticket URL: <https://code.djangoproject.com/ticket/17014#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.