Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-18 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8beta2
  (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 yoyoma):

 For posterity, the patch addressed the issue fully, and sqlite3 is also
 supported. Thanks again, @timgraham and @jarshwah.

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-17 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8beta2
  (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 Tim Graham ):

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


Comment:

 In [changeset:"ff2aa4019259947734c4791d6afc9f5405d901d0" ff2aa401]:
 {{{
 #!CommitTicketReference repository=""
 revision="ff2aa4019259947734c4791d6afc9f5405d901d0"
 Fixed #24486 -- Fixed error with datetime and DurationField arithmetic
 }}}

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-17 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8beta2
  (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 Tim Graham ):

 In [changeset:"34e09e532da41d56d3ba68babd05c4fd848abaa2" 34e09e5]:
 {{{
 #!CommitTicketReference repository=""
 revision="34e09e532da41d56d3ba68babd05c4fd848abaa2"
 [1.8.x] Fixed #24486 -- Fixed error with datetime and DurationField
 arithmetic

 Backport of ff2aa4019259947734c4791d6afc9f5405d901d0 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/064.c3e6f243b0a2fa8dc34ee210760488d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-16 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8beta2
  (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 timgraham):

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


Comment:

 Oops, those commits were meant for ticket #24485.

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-16 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8beta2
  (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 Tim Graham ):

 In [changeset:"09062e9509c56088793776bfda9db056c797552e" 09062e95]:
 {{{
 #!CommitTicketReference repository=""
 revision="09062e9509c56088793776bfda9db056c797552e"
 [1.8.x] Fixed #24486 -- Documented method to provide output_field to mixed
 F expressions

 Backport of 820381d38bc02ea8b92837ce869e7332a7db9913 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/064.c2d2f78692a7fb72328f99201c3afe41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-16 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8beta2
  (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 Tim Graham ):

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


Comment:

 In [changeset:"820381d38bc02ea8b92837ce869e7332a7db9913" 820381d3]:
 {{{
 #!CommitTicketReference repository=""
 revision="820381d38bc02ea8b92837ce869e7332a7db9913"
 Fixed #24486 -- Documented method to provide output_field to mixed F
 expressions
 }}}

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-16 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.8beta2
  (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
-+-

Comment (by yoyoma):

 @jarshwah thanks. I've just donated $25 to the Django Fellowship program
 as a small thanks for your help, as well as the help of @timgraham who
 helped me with a few tickets recently.

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-15 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.8beta2
  (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 jarshwah):

 * has_patch:  0 => 1
 * stage:  Accepted => Ready for checkin


Comment:

 Pull request: https://github.com/django/django/pull/4328

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-15 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  jarshwah
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.8beta2
  (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 jarshwah):

 * owner:  nobody => jarshwah
 * status:  new => assigned
 * version:  master => 1.8beta2
 * stage:  Unreviewed => Accepted


Comment:

 @yoyoma it *is* triggered by databases where: `not
 connection.features.has_native_duration_field ` such as sqlite. I've got
 enough to investigate, thanks for the 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/064.dfb19eafb3431a5ae877cefdc4176c7e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-15 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   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 yoyoma):

 @jarshwa I'm using sqlite3 (local dev). I don't think there is anything in
 the code that could result in this difference, but in the morning I will
 create a new app and try to replicate it in isolation. Perhaps, there is
 something else in my app that is having some sort of affect.

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


Re: [Django] #24486: UnboundLocalError in db.models.expressions

2015-03-15 Thread Django
#24486: UnboundLocalError in db.models.expressions
-+-
 Reporter:  yoyoma   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by jarshwah):

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


Comment:

 I can see the problem in the code, but I can't replicate the error for
 some reason.

 {{{
 In [16]: Ticket.objects.filter(
 active_at__lte=now,
 active_at__gt=now - models.F('duration')
 )
 Out[16]: []
 }}}

 Is there something else in your query that helps to trigger this
 condition? Though I doubt it'll make a difference, which database are you
 using to test?

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


[Django] #24486: UnboundLocalError in db.models.expressions

2015-03-14 Thread Django
#24486: UnboundLocalError in db.models.expressions
--+
 Reporter:  yoyoma|  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Release blocker   |   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 After filing #24485, I stumbled into a bug that is somewhat related, in
 the sense of its relationship to {{{output_field}}} and
 {{{DurationField}}} support in general. An {{{UnboundLocalError}}} occurs
 @
 
https://github.com/django/django/blob/ceaf31adfff3801f1092a215f73704e15a70e90c/django/db/models/expressions.py#L401.

 I discovered this while running the following:

 {{{
 Ticket.objects.filter(
 active_at__lte=now,
 active_at__gt=now - models.F('duration')
 )
 }}}

 Using the following model:

 {{{
 class Ticket(models.Model):
 # ... other fields omitted
 active_at = models.DateTimeField()
 duration = models.DurationField()
 }}}

 I've categorized this as a release blocker, because it prohibits the use
 of {{{DurationField}}} with {{{F}}}.

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