[Django] #31122: Contradiction in docs/ref/models/lookups

22 views
Skip to first unread message

Django

unread,
Dec 26, 2019, 8:56:59 AM12/26/19
to django-...@googlegroups.com
#31122: Contradiction in docs/ref/models/lookups
------------------------------------------------+------------------------
Reporter: Hongtao Ma | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
{{{
For a class to be a lookup, it must follow the Query Expression API.
**Lookup and Transform naturally follow this API.**
}}}


{{{
A Lookup is a generic class to implement lookups. A lookup is a query
expression with a left-hand side, lhs; a right-hand side, rhs; and a
lookup_name that is used to produce a boolean comparison between lhs and
rhs such as lhs in rhs or lhs > rhs.

The notation to use a lookup in an expression is
<lhs>__<lookup_name>=<rhs>.

**This class doesn’t follow the Query Expression API** since it has =<rhs>
on its construction: lookups are always the end of a lookup expression.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31122>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 27, 2019, 2:35:37 AM12/27/19
to django-...@googlegroups.com
#31122: Clarify how `Lookup` follow the Query Expression API.
--------------------------------------+------------------------------------

Reporter: Hongtao Ma | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by felixxm):

* stage: Unreviewed => Accepted


Comment:

Agreed, we should clarify how the `Lookup` class follow the Query
Expression API, because it implements `as_sql()` and `as_vendorname()`.

--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:1>

Django

unread,
Dec 27, 2019, 2:36:09 AM12/27/19
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
--------------------------------------+------------------------------------

Reporter: Hongtao Ma | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:2>

Django

unread,
Jan 15, 2020, 10:52:41 AM1/15/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Rohit Jha
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 3.0

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Rohit Jha):

* owner: nobody => Rohit Jha
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:3>

Django

unread,
Jan 23, 2020, 3:21:48 PM1/23/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
--------------------------------------+------------------------------------
Reporter: Hongtao Ma | Owner: (none)

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Rohit Jha):

* owner: Rohit Jha => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:4>

Django

unread,
Jan 23, 2020, 3:22:48 PM1/23/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Rohit Jha
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 3.0

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Rohit Jha):

* owner: (none) => Rohit Jha


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:5>

Django

unread,
Feb 14, 2020, 2:39:46 PM2/14/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
--------------------------------------+------------------------------------
Reporter: Hongtao Ma | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Rohit Jha):

* owner: Rohit Jha => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:6>

Django

unread,
Jul 28, 2020, 11:34:06 AM7/28/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
--------------------------------------+------------------------------------
Reporter: Hongtao Ma | Owner: AP Jama
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.0

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by AP Jama):

* owner: nobody => AP Jama


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:3>

Django

unread,
Aug 2, 2020, 9:50:20 AM8/2/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
--------------------------------------+------------------------------------
Reporter: Hongtao Ma | Owner: (none)

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by AP Jama):

* cc: AP Jama (added)
* owner: AP Jama => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:4>

Django

unread,
Nov 5, 2020, 1:52:34 AM11/5/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Caio
Type: | Ariede
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.0

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:7>

Django

unread,
Nov 11, 2020, 8:14:05 AM11/11/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Caio
Type: | Ariede
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.0
Severity: Normal | Resolution:
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 Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:8>

Django

unread,
Nov 11, 2020, 8:51:53 AM11/11/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Caio
Type: | Ariede
Cleanup/optimization | Status: closed
Component: Documentation | Version: 3.0
Severity: Normal | 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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7ace6265d68febc2914aafe39cd671c13da43715" 7ace6265]:
{{{
#!CommitTicketReference repository=""
revision="7ace6265d68febc2914aafe39cd671c13da43715"
[3.1.x] Fixed #31122 -- Clarified that Lookup acts as a query expression.

Backport of 9a3454f6046b9b7591fd03e21cf6da0b23c57689 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:10>

Django

unread,
Nov 11, 2020, 8:51:53 AM11/11/20
to django-...@googlegroups.com
#31122: Clarify how the Lookup class follow the Query Expression API.
-------------------------------------+-------------------------------------
Reporter: Hongtao Ma | Owner: Caio
Type: | Ariede
Cleanup/optimization | Status: closed
Component: Documentation | Version: 3.0

Severity: Normal | 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 Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"9a3454f6046b9b7591fd03e21cf6da0b23c57689" 9a3454f]:
{{{
#!CommitTicketReference repository=""
revision="9a3454f6046b9b7591fd03e21cf6da0b23c57689"
Fixed #31122 -- Clarified that Lookup acts as a query expression.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31122#comment:9>

Reply all
Reply to author
Forward
0 new messages