Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-08 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   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
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"277ed072094ad87fc6b2c4669f21d43b1f39043c" 277ed072]:
 {{{
 #!CommitTicketReference repository=""
 revision="277ed072094ad87fc6b2c4669f21d43b1f39043c"
 Fixed #29195 -- Fixed Exists.output_field resolution on single-valued
 queries.

 The Subquery class which Exists inherits from defaulted to using single-
 valued
 querie's field if no output_field was explicitly specified on
 initialization
 which was bypassing the Exists.output_field defined at the class level.

 Moving Subquery's dynamic output_field resolution to _resolve_output_field
 should make sure the fallback logic is only performed if required.

 Regression in 08654a99bbdd09049d682ae57cc94241534b29f0.

 Thanks Oli Warner for the detailed report.
 }}}

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-08 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   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 Tim Graham ):

 In [changeset:"0fd21febe7b3969460e3e6f17bfedc63529f194b" 0fd21feb]:
 {{{
 #!CommitTicketReference repository=""
 revision="0fd21febe7b3969460e3e6f17bfedc63529f194b"
 [2.0.x] Fixed #29195 -- Fixed Exists.output_field resolution on single-
 valued queries.

 The Subquery class which Exists inherits from defaulted to using single-
 valued
 querie's field if no output_field was explicitly specified on
 initialization
 which was bypassing the Exists.output_field defined at the class level.

 Moving Subquery's dynamic output_field resolution to _resolve_output_field
 should make sure the fallback logic is only performed if required.

 Regression in 08654a99bbdd09049d682ae57cc94241534b29f0.

 Thanks Oli Warner for the detailed report.

 Backport of 277ed072094ad87fc6b2c4669f21d43b1f39043c 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/067.e2804c063c3b0c818562643896e63b01%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-08 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 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 Oli Warner):

 Thank you, Simon. I really appreciate you picking this up so fast and
 fixing it.

 I've tested your branch and it does fix my little test harness too.

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-07 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   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):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/9765

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-07 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   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 Simon Charette):

 * owner:  nobody => Simon Charette
 * status:  new => assigned


Comment:

 I figured it out.

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-07 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Release blocker  |   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 Simon Charette):

 * cc: Simon Charette (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Hey Oli, thank you for your report!

 I'm not sure what is at play here but if you bisected the issue to this
 commit and it's possible to work around it using an explicit
 `output_field` it's probably an issue with expression cloning.

 Would it be possible to include the fully generated queries that crashes
 on PostgreSQL, it should be doable using the ` --debug-sql` flag to the
 test command.

 I didn't reproduce but accepting based on the detailed error report.

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-07 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (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
-+-

Comment (by Oli Warner):

 This can be worked around by explicitly casting with `output_field `. The
 following works:

 {{{
 Booking.objects.all().annotate(has_payments=Exists(payment_query,
 output_field=BooleanField())).filter(has_payments=True)
 }}}

 ... But it shouldn't be necessary.

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


Re: [Django] #29195: Postgres Regression, annotating Exists through a OuterRef query.

2018-03-07 Thread Django
#29195: Postgres Regression, annotating Exists through a OuterRef query.
-+-
 Reporter:  Oli Warner   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (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
-+-

Comment (by Oli Warner):

 I ran a bisect all the way back to 301de774c2  (April 17, when I knew it
 worked). I altered the test so that `git bisect run` would only consider a
 bad result one that contained a message about "explicit type casts". The
 first commit to break this was:

 {{{
 commit 08654a99bbdd09049d682ae57cc94241534b29f0
 Author: Simon Charette 
 Date:   Tue Aug 8 13:31:59 2017 -0400

 Fixed #28492 -- Defined default output_field of expressions at the
 class level.

 This wasn't possible when settings were accessed during Field
 initialization
 time as our test suite setup script was triggering imports of
 expressions
 before settings were configured.
 }}}

 I'm really quite a distance out of my comfort zone here —I don't usually
 spend this much time in the guts of Django— so even looking at the bisect
 visualisation, I'm not sure what change actually broke this. Still, I hope
 this helps.

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