#13206: Model does not call super __init__
-------------------------------------+-------------------------------------
               Reporter:  gav        |        Owner:  nobody
                   Type:  Bug        |       Status:  reopened
              Milestone:  1.3        |    Component:  Database layer
                Version:  SVN        |  (models, ORM)
             Resolution:             |     Severity:  Normal
           Triage Stage:  Accepted   |     Keywords:  __init__ super Model
    Needs documentation:  0          |    Has patch:  1
Patch needs improvement:  0          |  Needs tests:  0
-------------------------------------+-------------------------------------
Changes (by alaa):

 * status:  closed => reopened
 * resolution:  fixed =>
 * type:   => Bug
 * severity:   => Normal


Comment:

 there is backwards compatibility issues with this change, init for sibling
 class in cases where there is multiple inheritance is now called when it
 wasn't called before, and called at a specific point in model
 construction.

 code that used multiple inheritance with models would have had to
 explicitly call init or assume it never gets called, so I can't see how u
 consider this backward compatible.

 that's a major change to introduce in a bug fix release (1.2.5), it is
 also an undocumented change.

 it doesn't help with situation where there are more than two classes
 involved in the multiple inheritance, always calls the constructor at the
 end of the function when there are situations where it might be better
 called at the start, so I'm not sure it is better than letting client code
 explicitly call the constructor if required.

 it also assumes __init__ in all classes involved requires no arguments
 (should at least pass *args, **kwargs).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13206#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to