[Django] #22806: Some lookups/transforms don't have lookup_name

4 views
Skip to first unread message

Django

unread,
Jun 11, 2014, 5:09:42 AM6/11/14
to django-...@googlegroups.com
#22806: Some lookups/transforms don't have lookup_name
----------------------------------------------+--------------------
Reporter: jorgecarleitao | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
because `RegisterLookupMixin.register_lookup` requires the lookup to have
a `lookup_name`, any transformation or lookup without it raises an
AttributeError when registered.

in `contrib.postgres.fields.array`, some Transforms don't have
`lookup_name` defined.

One will have to check out if we are missing any other.

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

Django

unread,
Jun 16, 2014, 8:36:41 AM6/16/14
to django-...@googlegroups.com
#22806: Some lookups/transforms don't have lookup_name
----------------------------------+------------------------------------

Reporter: jorgecarleitao | Owner: nobody
Type: Bug | Status: new
Component: contrib.postgres | Version: master
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 timo):

* needs_better_patch: => 0
* needs_docs: => 0
* component: Database layer (models, ORM) => contrib.postgres
* needs_tests: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Jul 15, 2014, 7:56:06 AM7/15/14
to django-...@googlegroups.com
#22806: Some lookups/transforms don't have lookup_name
----------------------------------+------------------------------------

Reporter: jorgecarleitao | Owner: nobody
Type: Bug | Status: new
Component: contrib.postgres | Version: master
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
----------------------------------+------------------------------------

Comment (by mjtamlyn):

`IndexTransform` and `SliceTransform` do not have `lookup_name` defined at
the moment. However they are not designed to be registered using
`register_lookup` at the moment. I guess this could be a reasonable use
case on a third party field somehow?

Can you expand on why this is causing you a problem?

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

Django

unread,
Jul 15, 2014, 8:03:04 AM7/15/14
to django-...@googlegroups.com
#22806: Some lookups/transforms don't have lookup_name
--------------------------------------+------------------------------------
Reporter: jorgecarleitao | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: contrib.postgres | Version: master
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 jorgecarleitao):

* type: Bug => Cleanup/optimization


Comment:

I reported this when I was writing the API references of lookups. Only
later I understood that only Transform and Lookup are to be registered
(now documented). So, this is now more a cleanup / internals consistency
than a bug. I changed it accordingly. Maybe it is not a ticket at all at
the moment.

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

Django

unread,
Jul 24, 2014, 4:01:45 AM7/24/14
to django-...@googlegroups.com
#22806: Some lookups/transforms don't have lookup_name
--------------------------------------+------------------------------------
Reporter: jorgecarleitao | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: invalid

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 mjtamlyn):

* status: new => closed
* resolution: => invalid


Comment:

OK, I'm going to close this for now as I don't think it is an issue in
this case. If someone has a genuine use case then we can add it, but I
believe the way they are written means they cannot be used directly with
`register_lookup` because their `__init__` signature is wrong - you need
the factory.

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

Reply all
Reply to author
Forward
0 new messages