Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-04-24 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 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
-+-

Comment (by Carlton Gibson ):

 In [changeset:"607ff4efa31cd0c2217ed021dc939ffddad89c97" 607ff4e]:
 {{{
 #!CommitTicketReference repository=""
 revision="607ff4efa31cd0c2217ed021dc939ffddad89c97"
 Refs #30254 -- Added tests for Model.__hash__() inheritance.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.eb990c08471fa7d6258aa55d4c77ae2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 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
-+-

Comment (by Tim Graham ):

 In [changeset:"58ad030d05fa50cfed327368ab61defca3303e02" 58ad030d]:
 {{{
 #!CommitTicketReference repository=""
 revision="58ad030d05fa50cfed327368ab61defca3303e02"
 Fixed #30254 -- Allowed model metaclasses to access the attribute dict in
 __init__().

 Regression in a68ea231012434b522ce45c513d84add516afa60.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.957035928b87bde3b8f47b660ef9e020%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 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 Tim Graham ):

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


Comment:

 In [changeset:"985e6c224be0681d7a753b9ded4646024d332bc7" 985e6c22]:
 {{{
 #!CommitTicketReference repository=""
 revision="985e6c224be0681d7a753b9ded4646024d332bc7"
 [2.2.x] Fixed #30254 -- Allowed model metaclasses to access the attribute
 dict in __init__().

 Regression in a68ea231012434b522ce45c513d84add516afa60.

 Backport of 58ad030d05fa50cfed327368ab61defca3303e02 from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.3217899036e9ee5766e801c5c7d65551%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   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 Tim Graham):

 * severity:  Normal => Release blocker
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.afc807f757145097ae34d3f4f84bd37d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (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 Simon Charette):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.0f9cb8c00f2e7cfd4dd84f5701caf3b0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Matt Westcott):

 * has_patch:  0 => 1


Comment:

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

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.4f3e9c33f9b5f987837cd70ddd915fc4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
 Reporter:  Matt Westcott|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * cc: Sergey Fedoseev (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.606279ef19d69204970e62a6bb02374e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #30254: Custom model metaclasses cannot access the attribute dict in __init__

2019-03-14 Thread Django
#30254: Custom model metaclasses cannot access the attribute dict in __init__
-+-
   Reporter:  Matt   |  Owner:  nobody
  Westcott   |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.2
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 In Django <=2.2, it is possible for models to define a custom metaclass
 (as a subclass of `models.base.ModelBase`) and access the attribute dict
 of the class being defined:

 {{{
 from django.db import models


 class PageBase(models.base.ModelBase):
 def __init__(cls, name, bases, dct):
 super(PageBase, cls).__init__(name, bases, dct)
 if 'magic' in dct:
 print("enabling magic on %s" % (name))


 class Page(models.Model, metaclass=PageBase):
 magic = True

 title = models.CharField(max_length=255)
 }}}

 As of commit a68ea231012434b522ce45c513d84add516afa60, this fails because
 all attributes without a `contribute_to_class` method are popped from the
 dict in `ModelBase.__new__` .

 (This pattern is used by Wagtail's Page model
 
https://github.com/wagtail/wagtail/blob/3e1e67021e0a20783ed59e17b43e3c481897fce3/wagtail/core/models.py#L190
 , so this is causing various failures against django stable/2.2.x.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.1b706ef25170dce224009a00d4bb45a9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.