[Django] #26421: ModelSignal should use Apps.lazy_model_operation

9 views
Skip to first unread message

Django

unread,
Mar 30, 2016, 5:12:15 AM3/30/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
----------------------------------------------+--------------------
Reporter: AlexHill | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
`ModelSignal`s currently have their own mechanism for resolving model
strings. For consistency and simplicity they should probably just use the
mechanism provided by `Apps`.

PR: https://github.com/django/django/pull/6359

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

Django

unread,
Mar 30, 2016, 7:19:56 AM3/30/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
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 timgraham):

* needs_better_patch: => 1
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Tests aren't passing on Python 2.

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

Django

unread,
Mar 30, 2016, 11:24:47 AM3/30/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
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
-------------------------------------+-------------------------------------

Comment (by AlexHill):

I couldn't replicate the failures under 2.7 on my machine. I think this
bug was being triggered (`partial.keywords` sometimes being `None` instead
of an empty dictionary): https://mail.python.org/pipermail/python-
checkins/2016-February/141212.html

I've updated the patch with a workaround and everything's green now.

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

Django

unread,
Mar 30, 2016, 12:46:11 PM3/30/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | 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 timgraham):

* needs_better_patch: 1 => 0


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

Django

unread,
Apr 6, 2016, 2:50:25 AM4/6/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
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 charettes):

* stage: Accepted => Ready for checkin


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

Django

unread,
Apr 7, 2016, 10:52:00 AM4/7/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
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 timgraham):

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


Comment:

Left a few comments for improvement.

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

Django

unread,
May 15, 2016, 8:45:42 PM5/15/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | 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 timgraham):

* needs_better_patch: 1 => 0


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

Django

unread,
May 19, 2016, 9:44:56 PM5/19/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | 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 Tim Graham <timograham@…>):

In [changeset:"2ff7ef15b0a1d41e3f121e96cb72a383863046c0" 2ff7ef15]:
{{{
#!CommitTicketReference repository=""
revision="2ff7ef15b0a1d41e3f121e96cb72a383863046c0"
Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks
and tests
}}}

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

Django

unread,
May 19, 2016, 9:44:57 PM5/19/16
to django-...@googlegroups.com
#26421: ModelSignal should use Apps.lazy_model_operation
-------------------------------------+-------------------------------------
Reporter: AlexHill | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | 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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"779bb82f519420418a711f7ae75e71d600de3224" 779bb82f]:
{{{
#!CommitTicketReference repository=""
revision="779bb82f519420418a711f7ae75e71d600de3224"
Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation()
}}}

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

Reply all
Reply to author
Forward
0 new messages