Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-18 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.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 Mariusz Felisiak ):

 In [changeset:"349bb58b8a0b6f4b98193dbfe369e41b8780f225" 349bb58b]:
 {{{
 #!CommitTicketReference repository=""
 revision="349bb58b8a0b6f4b98193dbfe369e41b8780f225"
 [3.2.x] Fixed #32733 -- Skipped system check for specifying type of auto-
 created primary keys on abstract models.

 Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.

 Backport of a24fed399ced6be2e9dce4cf28db00c3ee21a21c from main
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4e5c43e652771c7b28af985a3faaf14b%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-18 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.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 Mariusz Felisiak ):

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


Comment:

 In [changeset:"a24fed399ced6be2e9dce4cf28db00c3ee21a21c" a24fed39]:
 {{{
 #!CommitTicketReference repository=""
 revision="a24fed399ced6be2e9dce4cf28db00c3ee21a21c"
 Fixed #32733 -- Skipped system check for specifying type of auto-created
 primary keys on abstract models.

 Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1848bc4a024dee7e414999a469a4164a%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-18 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.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 Mariusz Felisiak):

 * severity:  Normal => Release blocker


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d87fe41c819c8f0de90586d37f010405%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-18 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (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 Johannes Maron):

 * needs_tests:  1 => 0
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.25a9ece24021b8078ed342aa88071609%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-17 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by amureki):

 * needs_better_patch:  1 => 0


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4d76a8d2a8fcd26072da8bae6ed64cb4%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-11 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Johannes Maron):

 * needs_better_patch:  0 => 1


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.92248dfca4d61a8bb3465fff1ed025c2%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-10 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by amureki):

 * owner:  nobody => amureki
 * status:  new => assigned
 * has_patch:  0 => 1
 * needs_tests:  0 => 1


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.88fb9671c72295115968bfa232fb1a0d%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-10 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by amureki):

 Replying to [comment:1 Johannes Maron]:
 > It is arguable, whether if the checks need to work on an abstract class.
 I also noticed that Django will raise an error since 3.2 if you try to
 instantiate an abstract model.
 > Though, there is no place where checks are called on abstract models
 inside an application, this does make unit testing harder.
 >
 > With that in mind, maybe this is best classified as an optimization not
 a bug, since no public API is broken, not does this affect the application
 itself. However, since Django is a developer-friendly framework and comes
 with an excellent test suite, I believe an improvement would be welcome by
 many.

 Thanks, Johannes!

 I made a draft [https://github.com/django/django/pull/14375 PR] with blunt
 solution - freshly introduced auto-field check would not run on abstract
 models.
 I am more than happy to get better ideas or any other feedback!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.37626bfde45df77cb8da1ea48f2aec16%40djangoproject.com.


Re: [Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-10 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
 Reporter:  amureki  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Johannes Maron):

 * cc: Johannes Maron (added)
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 It is arguable, whether if the checks need to work on an abstract class. I
 also noticed that Django will raise an error since 3.2 if you try to
 instantiate an abstract model.
 Though, there is no place where checks are called on abstract models
 inside an application, this does make unit testing harder.

 With that in mind, maybe this is best classified as an optimization not a
 bug, since no public API is broken, not does this affect the application
 itself. However, since Django is a developer-friendly framework and comes
 with an excellent test suite, I believe an improvement would be welcome by
 many.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.32ff62a671bd8a926886e3067e9e8594%40djangoproject.com.


[Django] #32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with AttributeError

2021-05-10 Thread Django
#32733: DEFAULT_AUTO_FIELD feature leads `AbstractModel.check()` to fail with
AttributeError
-+-
   Reporter:  amureki|  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Database   |Version:  3.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  |
-+-
 Here is a simple code that shows different behaviour between 3.1 and 3.2:

 {{{
 from django.db import models
 class MyAbstractModel(models.Model):
 class Meta:
 abstract = True

 # behaviour in 3.1.10:
 MyAbstractModel.check() # returns []

 # behaviour in 3.2:
 MyAbstractModel.check() # raises AttributeError: 'NoneType' object has no
 attribute 'auto_created' in `_check_default_pk`
 }}}

 It seems to me (but I might be wrong here) that this was not an
 intentional change (as the feature is all about default autofield), but
 rather a bug.
 However, feel free to correct me!

 Best,
 Rust

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.1e2c5c9253d3593497beece30729%40djangoproject.com.