Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-05 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  aggregation, | Triage Stage:  Accepted
  annotation, filter |
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:"4e6f0024f19f74be2fe4d9ec637b87e82054ebd6" 4e6f002]:
 {{{
 #!CommitTicketReference repository=""
 revision="4e6f0024f19f74be2fe4d9ec637b87e82054ebd6"
 [2.2.x] Fixed #30542 -- Fixed crash of numerical aggregations with filter.

 Filters in annotations crashed when used with numerical-type
 aggregations (i.e. Avg, StdDev, and Variance). This was caused as the
 source expressions no not necessarily have an output_field (such as the
 filter field), which lead to an AttributeError: 'WhereNode' object has
 no attribute output_field.

 Thanks to Chuan-Zheng Lee for the report.

 Regression in c690afb873cac8035a3cb3be7c597a5ff0e4b261 and two following
 commits.

 Backport of 4b6dfe16226a81fea464ac5f77942f4d6ba266e8 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/063.e0722f1ddbaf6d0f20a38116b6ecad35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-05 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:  aggregation, | Triage Stage:  Accepted
  annotation, filter |
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:"4b6dfe16226a81fea464ac5f77942f4d6ba266e8" 4b6dfe1]:
 {{{
 #!CommitTicketReference repository=""
 revision="4b6dfe16226a81fea464ac5f77942f4d6ba266e8"
 Fixed #30542 -- Fixed crash of numerical aggregations with filter.

 Filters in annotations crashed when used with numerical-type
 aggregations (i.e. Avg, StdDev, and Variance). This was caused as the
 source expressions no not necessarily have an output_field (such as the
 filter field), which lead to an AttributeError: 'WhereNode' object has
 no attribute output_field.

 Thanks to Chuan-Zheng Lee for the report.

 Regression in c690afb873cac8035a3cb3be7c597a5ff0e4b261 and two following
 commits.
 }}}

-- 
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/063.6d0efd939fd480a67d1addd0d0e77f81%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-04 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  aggregation, | Triage Stage:  Accepted
  annotation, filter |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Nick Pope):

 * version:  2.0 => 2.2
 * severity:  Normal => Release blocker


Comment:

 Correct, this is a regression in
 
[https://github.com/django/django/pull/10764/commits/c690afb873cac8035a3cb3be7c597a5ff0e4b261
 c690afb] which affects `Avg()`. `StdDev()` and `Variance()` are affected
 by
 
[https://github.com/django/django/pull/10764/commits/e85afa5943695457c85e9bc1c5dc0d985004e303
 e85afa5] and
 
[https://github.com/django/django/pull/10764/commits/6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d
 6d4efa8] respectively.

-- 
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/063.58e7f7de121e1b9f485d415c10a57ee9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-04 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  aggregation, | Triage Stage:  Accepted
  annotation, filter |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chuan-Zheng Lee):

 Contrary to my earlier guess, the first commit with the issue is
 c690afb873cac8035a3cb3be7c597a5ff0e4b261, which modifies `Avg` to use the
 new logic. Its parent, 3d5e0f8394688d40036e27cfcfac295e6fe622609, works
 fine, because while it modified the mixin to its current form, it didn't
 touch `Avg`.

-- 
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/063.784e28e95f7c677e413cd18f579202fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-04 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  Étienne
 |  Beaulé
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  aggregation, | Triage Stage:  Accepted
  annotation, filter |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Étienne Beaulé):

 * status:  new => assigned
 * owner:  nobody => Étienne Beaulé
 * has_patch:  0 => 1
 * version:  2.2 => 2.0
 * stage:  Unreviewed => Accepted


Comment:

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

-- 
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/063.df3bf64c2149bc1aa71781d09187%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30542: Float-valued aggregations and annotations with filters fail with AttributeError

2019-06-04 Thread Django
#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-+-
 Reporter:  Chuan-Zheng Lee  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  aggregation, | Triage Stage:
  annotation, filter |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chuan-Zheng Lee):

 I couldn't tell you for sure because I haven't actually tried reproducing
 it on this commit or its parent, but if I had to take a guess as to which
 commit introduced the issue, I'd try
 a0b19a0f5b1731cf575546175034da53f5af5367, which introduced
 `OutputFieldMixin`, a precursor to `NumericOutputFieldMixin` with similar
 logic. I'll say something if I manage to give this a go.

-- 
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/063.1122771aac9bb625f7fb288dcea18460%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.