#36934: BuiltinLookup breaks with params-as-a-tuple in django 6.0
-------------------------------------+-------------------------------------
     Reporter:  Stefan Bühler        |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  6.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Clifford Gama):

 Hello Jacob. Sorry, I didn't know about #36922 and hadn't thought to check
 for duplicates.

 > Sorry, it's not obvious to me. BuiltinLookup.process_lhs returns a list
 of params in Django 6.0. Where is a tuple returned? From a custom lookup?

 I can't work on a reproduction now, but when I was working on something
 `JSONNull` related I ran into the problem (which is why I was able to spot
 it during the
 [https://github.com/django/django/pull/20005#pullrequestreview-3384655660
 review]). The issue is that if you have a custom lookup that overrides
 `process_lhs()`, does something with LHS params but does not override
 `as_sql()`, the latter will break because it expects a process_lhs to
 return a list
 
[https://github.com/django/django/blob/c87daabbf32779f5421a846dd33a7dd46cc27d54/django/db/models/lookups.py#L237-L242
 source].
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36934#comment:5>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019c772c9d97-a08ffe8b-8845-44e3-bc4e-742cda21396b-000000%40eu-central-1.amazonses.com.

Reply via email to