Re: [Django] #36934: BuiltinLookup.as_sql breaks with params-as-a-tuple

0 views
Skip to first unread message

Django

unread,
Feb 19, 2026, 3:00:00 PMFeb 19
to django-...@googlegroups.com
#36934: BuiltinLookup.as_sql breaks with params-as-a-tuple
-------------------------------------+-------------------------------------
Reporter: Stefan Bühler | Owner: Jacob
| Walls
Type: Bug | Status: assigned
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
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* has_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/20734 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/36934#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 20, 2026, 9:12:59 AMFeb 20
to django-...@googlegroups.com
#36934: BuiltinLookup.as_sql breaks with params-as-a-tuple
-------------------------------------+-------------------------------------
Reporter: Stefan Bühler | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"f9b820f8ac50aad025949087e660a551691832e4" f9b820f]:
{{{#!CommitTicketReference repository=""
revision="f9b820f8ac50aad025949087e660a551691832e4"
[6.0.x] Fixed #36934, Refs #35972 -- Coped with params in a tuple in
BuiltinLookup.as_sql().

For custom lookups subclassing BuiltinLookup and following the advice in
the release notes
to return params in a tuple, this change will obviate the need to audit
as_sql() in addition to
process_lhs() to be "resilient against either tuples or lists" as
described in the release note.

Regression in 8914f4703cf03e2a01683c4ba00f5ae7d3fa449d.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36934#comment:8>

Django

unread,
Feb 20, 2026, 9:20:03 AMFeb 20
to django-...@googlegroups.com
#36934: BuiltinLookup.as_sql breaks with params-as-a-tuple
-------------------------------------+-------------------------------------
Reporter: Stefan Bühler | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
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 Jacob Walls <jacobtylerwalls@…>):

In [changeset:"96984b9b0f1d88f096985a908ee67dc6f2b9a682" 96984b9]:
{{{#!CommitTicketReference repository=""
revision="96984b9b0f1d88f096985a908ee67dc6f2b9a682"
Refs #36934, #35972 -- Forwardported release note for tolerating sequences
in BuiltinLookup.as_sql().

Instead of cherry-picking a larger changeset
(787cc96ef6197d73c7d4ad96f25500910c399603)
and removing changes unsuitable for a backport, a partial backport was
applied directly
to stable/6.0.x to resolve #36934, so the release note needs to be
forwardported.

Forwardport of f9b820f8ac50aad025949087e660a551691832e4 from stable/6.0.x.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36934#comment:9>

Django

unread,
Feb 20, 2026, 3:14:27 PMFeb 20
to django-...@googlegroups.com
#36934: BuiltinLookup.as_sql breaks with params-as-a-tuple
-------------------------------------+-------------------------------------
Reporter: Stefan Bühler | Owner: Jacob
| Walls
Type: Bug | Status: closed
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36934#comment:10>
Reply all
Reply to author
Forward
0 new messages