Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2014-02-28 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  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:"5cda1d27027ea74d8a1b53e43bef697cd4426e9a"]:
 {{{
 #!CommitTicketReference repository=""
 revision="5cda1d27027ea74d8a1b53e43bef697cd4426e9a"
 [1.6.x] Fixed #21643 -- repeated execution of qs with F() + timedelta

 Thanks Tim Graham for review and Tai Lee for the additional test to prove
 this was a regression in 1.6.

 Backport of 7f2485b4d1 and 8137215973 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/075.dc6e3579b0759cc853ec54e59c0805d7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2014-02-28 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  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:"8137215973c8cf97f58f244021b1a4e75923ade8"]:
 {{{
 #!CommitTicketReference repository=""
 revision="8137215973c8cf97f58f244021b1a4e75923ade8"
 Added release note and regression test for refs #21643.

 This will be backported to stable/1.6.x along with the original fix.
 }}}

-- 
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/075.223097bff1936401665eccf4b538105c%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2014-02-20 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by mrmachine):

 The test from the fix already applied also fails in 1.5, but the following
 test passes in 1.5 and fails in 1.6 showing that this is a regression.

 {{{
 def test_query_clone(self):
 # Ticket #21643
 qs = Experiment.objects.filter(end__lt=F('start') +
 datetime.timedelta(hours=1))
 qs2 = qs.all()
 list(qs)
 list(qs2)
 }}}

 Is it enough to back port the existing commit, or should this new test
 also be committed and back ported?

-- 
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/075.e6c275604440a9db2fb8efdcfdcdf7b1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2014-02-20 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by mrmachine):

 This is a regression in 1.6, I believe due to the deep copy changes when
 cloning querysets. I confirmed that `F() + timedelta()` does work in 1.5.

 Previously, the `DateModifierNode` expression would  have been deep copied
 every time a queryset was cloned, so it would never have been evaluated
 twice.

 So I think this should be backported.

 Also #22101 was a duplicate.

-- 
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/075.ee67d2132b5d011c228d79e40835d436%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anssi Kääriäinen ):

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


Comment:

 In [changeset:"7f2485b4d180956aa556a88ed1d9754ea054"]:
 {{{
 #!CommitTicketReference repository=""
 revision="7f2485b4d180956aa556a88ed1d9754ea054"
 Fixed #21643 -- repeated execution of qs with F() + timedelta

 Thanks Tim Graham for review.
 }}}

-- 
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/075.0beaba6e8f5e77ed3cd524709c5f44b7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by despawnerer):

 Google seems to find reports of the error from way back in December 2011.
 The code in question hasn't been touched since it appeared with the
 introduction of support for F() + timedelta(). Looks like it's been this
 way for years.

-- 
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/075.26f1708d84a8a3f7062cc5ee310c4e07%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 OK, good enough for me. Is this a regression in 1.6 or has this bug
 existed for a longer time (that is, does this need to be backpatched to
 1.6)?

-- 
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/075.54c3b83cf82b8ba4118451ceb1ca4298%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by despawnerer):

 Sorry, I meant the timedelta value.

-- 
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/075.ff05630049f8f97c77a6785387314034%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by despawn@…):

 I've thought about that, but then the datetime value gets put in the query
 the second time (and incorrectly) in evaluate_node. There's probably a
 better way to do this, but I'm not exactly knowledgeable enough about
 Django internals to figure it out. The patch attached works as a quick-
 and-easy fix.

-- 
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/075.f0870cd49b1bbe081ac816c67593c968%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 Wouldn't it be better to use just node.children[-1] instead of .pop()?

-- 
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/075.3647c79cefecc13ee55c85a6b76e9175%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-21 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timo):

 * needs_tests:  1 => 0
 * stage:  Unreviewed => Ready for checkin


Comment:

 Verified the test and the rest of the test suite on SQlite.

-- 
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/075.904985a06285e0358b7061fb123dcd29%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-20 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
-+-
 Reporter:  despawn@…|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timo):

 * needs_better_patch:   => 0
 * needs_tests:   => 1
 * needs_docs:   => 0


Comment:

 Could you write a regression test that demonstrates the problem and proves
 it's fixed?

-- 
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/075.77e0a42b9b2c43393c1734f8dc7ec65d%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21643: QuerySets that use F() + timedelta() crash when compiling their query more than once

2013-12-20 Thread Django
#21643: QuerySets that use F() + timedelta() crash when compiling their query 
more
than once
--+
 Reporter:  despawn@… |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.6
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  1
Easy pickings:  0 |  UI/UX:  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 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/060.414ac3499179bf6f90f8e568c78d7ddd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.