[Django] #21175: abstract base model classes never fire class_prepared signal

12 views
Skip to first unread message

Django

unread,
Sep 26, 2013, 2:39:08 PM9/26/13
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 1.5
layer (models, ORM) | Keywords:
Severity: Normal | Has patch: 0
Triage Stage: | Needs tests: 0
Unreviewed | Easy pickings: 0
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
I can't think of a reason why this would be the preferred behavior.

In fact, `ensure_default_managers` (which is one of two uses of
`class_prepared` in Django itself) is written with a specific case to
handle abstract classes, even though it will never receive one, so clearly
somebody else had an expectation that they would fire the signal too.

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

Django

unread,
Sep 27, 2013, 3:54:05 AM9/27/13
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.5
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by EvilDMP):

* stage: Unreviewed => Accepted


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

Django

unread,
Nov 13, 2013, 5:00:20 PM11/13/13
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: cbabs
Type: Bug | Status: assigned

Component: Database layer | Version: 1.5
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by cbabs):

* owner: nobody => cbabs
* status: new => assigned


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

Django

unread,
Nov 13, 2013, 5:48:58 PM11/13/13
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: cbabs
Type: Bug | Status: assigned
Component: Database layer | Version: 1.5
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by cbabs):

Pull request: https://github.com/django/django/pull/1916

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

Django

unread,
May 16, 2014, 9:10:17 AM5/16/14
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: cbabs
Type: Bug | Status: assigned
Component: Database layer | Version: 1.5
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1

Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

Left some comments for improvement on the PR. Please uncheck "Patch needs
improvement" if you can update it, thanks.

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

Django

unread,
Feb 12, 2015, 12:07:47 PM2/12/15
to django-...@googlegroups.com
#21175: abstract base model classes never fire class_prepared signal
-------------------------------------+-------------------------------------
Reporter: carljm | Owner: cbabs
Type: Bug | Status: closed

Component: Database layer | Version: 1.5
(models, ORM) |
Severity: Normal | Resolution: wontfix
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 carljm):

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


Comment:

I am closing this; in light of #24313 and discussion on #24215, I no
longer think it makes sense for abstract models to fire `class_prepared`.
(In fact I'm hopeful that we can get rid of `class_prepared` altogether,
making it moot.)

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

Reply all
Reply to author
Forward
0 new messages