#2363: [patch] Tighten subclass check at top of 
db.models.base.ModelBase.__new__.
--------------------------------------+-------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  mtredinnick      
     Status:  reopened                |            Component:  Core framework   
    Version:                          |           Resolution:                   
   Keywords:                          |                Stage:  Ready for checkin
  Has_patch:  1                       |           Needs_docs:  0                
Needs_tests:  0                       |   Needs_better_patch:  1                
--------------------------------------+-------------------------------------
Comment (by [EMAIL PROTECTED]):

 That name check is there to prevent a chicken-and-egg problem when the
 definition of (django's) Model itself triggers metaclass evaluation.  I
 don't like it either, but there needs to be a guard against the actual
 reference later in the line.
 
 A better way may be to just try resolving the reference to Model in a try.
 If the metaclass truly is evaluating django's Model class, a NameError
 will be raise, and we can know to ignore this type.  (I'll put up a patch
 when I get home...)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2363#comment:6>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to