Re: [Django] #31750: Abstract model field should not be equal across models

2021-07-13 Thread Django
#31750: Abstract model field should not be equal across models
-+-
 Reporter:  Ryan Hiebert |Owner:  Ryan
 |  Hiebert
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Nicolas Delaby):

 Thanks for clarifying Mariusz.

-- 
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/069.4bf8ae38ac0e597cb39a7947a5e73cf4%40djangoproject.com.


Re: [Django] #31750: Abstract model field should not be equal across models

2021-07-13 Thread Django
#31750: Abstract model field should not be equal across models
-+-
 Reporter:  Ryan Hiebert |Owner:  Ryan
 |  Hiebert
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 > Hi, I wonder if the submitted fix didn't introduce a subtle regression.

 This is an expected change IMO. Model fields don't make much sense without
 models (even abstract) so we should distinguish between fields in abstract
 models and the same fields inherited from them.

-- 
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/069.74ea9e08fffac12929afcb0253e53de7%40djangoproject.com.


Re: [Django] #31750: Abstract model field should not be equal across models

2021-07-13 Thread Django
#31750: Abstract model field should not be equal across models
-+-
 Reporter:  Ryan Hiebert |Owner:  Ryan
 |  Hiebert
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Nicolas Delaby):

 Hi, I wonder if the submitted fix didn't introduce a subtle regression.
 Given the example posted in the description, how would you evaluate the
 following statements ?

 **before**
 
https://github.com/django/django/commit/502e75f9ed5476ffe8229109acf0c23999d4b533
 {{{#!python
 assert B._meta.get_field('myfield') == C._meta.get_field('myfield')
 assert B._meta.get_field('myfield') == A._meta.get_field('myfield')
 assert C._meta.get_field('myfield') == A._meta.get_field('myfield')
 }}}

 **after**
 
https://github.com/django/django/commit/502e75f9ed5476ffe8229109acf0c23999d4b533
 {{{#!python
 assert B._meta.get_field('myfield') != C._meta.get_field('myfield')
 assert B._meta.get_field('myfield') != A._meta.get_field('myfield')
 assert C._meta.get_field('myfield') != A._meta.get_field('myfield')
 }}}

 What if it shouldn't be this ? Since B (or C) doesn't override
 ''myfield'', I would expect the subclass to evaluate equality as if the
 field was defined on itself (given the parent model is abstract)
 **maybe?**
 {{{#!python
 assert B._meta.get_field('myfield') != C._meta.get_field('myfield')
 assert B._meta.get_field('myfield') == A._meta.get_field('myfield')
 assert C._meta.get_field('myfield') == A._meta.get_field('myfield')
 }}}

-- 
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/069.aafe022b908535da99bcfae2427e461e%40djangoproject.com.


Re: [Django] #31750: Abstract model field should not be equal across models

2020-06-30 Thread Django
#31750: Abstract model field should not be equal across models
-+-
 Reporter:  Ryan Hiebert |Owner:  Ryan
 |  Hiebert
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  3.0
  (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 Ryan Hiebert):

 * cc: Ryan Hiebert (added)
 * owner:  nobody => Ryan Hiebert
 * has_patch:  0 => 1
 * status:  new => assigned


Comment:

 [https://github.com/django/django/pull/13124 PR]

 Should this get backported? It feels like an (admittedly esoteric) bug fix
 to me. It affects ordering, though I've minimized that effect to only
 places where the ordering is currently undefined, as they are currently
 considered equal.

-- 
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/069.6cb961b9a35326c94962ae3dad051882%40djangoproject.com.


Re: [Django] #31750: Abstract model field should not be equal across models

2020-06-30 Thread Django
#31750: Abstract model field should not be equal across models
-+-
 Reporter:  Ryan Hiebert |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  3.0
  (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 Carlton Gibson):

 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 OK, happy to look at a patch — assuming nothing breaks...

 It'd be a change in behaviour, so would need calling out in the release
 notes.

-- 
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/069.6bba220f46e1bc1b928649096a50c6a4%40djangoproject.com.