#23758: Going beyond 5 levels of subqueries causes AssertionError in bump_prefix
-------------------------------------+-------------------------------------
     Reporter:  richardhowardsparx   |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  bump_prefix          |  Unreviewed
  subquery alias                     |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by inglesp):

 The behaviour changed in dcdc579d162b750ee3449e34efd772703592faca.

 I suppose a fix would be to start the aliases at A and, after reaching Z,
 use AA, AB, and so on.  But I'm not sure that such a deeply nested query
 is going to be hit in real life.  richardhowardsparx, how did you hit
 this?

 It does feel like we're mis-using `assert` -- in a framework like Django,
 I think they should be used more to guard against the possibility that the
 framework has got itself into an invalid state, while in this case, it's
 being used to guard against arguably-invalid user code.  Would a better
 error message be an acceptable resolution?

--
Ticket URL: <https://code.djangoproject.com/ticket/23758#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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.c8609896136a7cfaea508af61745ff7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to