Re: [Django] #30602: Raise ValueError in Extract lookups that don't work properly with DurationField.

2019-07-12 Thread Django
#30602: Raise ValueError in Extract lookups that don't work properly with
DurationField.
-+-
 Reporter:  cecedille1   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  master
  (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:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"402e6d292fd8aa5dfd49166e80098122950053f7" 402e6d29]:
 {{{
 #!CommitTicketReference repository=""
 revision="402e6d292fd8aa5dfd49166e80098122950053f7"
 Fixed #30602 -- Made Extract raise ValueError when using unsupported
 lookups for DurationField.
 }}}

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


Re: [Django] #30602: Raise ValueError in Extract lookups that don't work properly with DurationField.

2019-07-11 Thread Django
#30602: Raise ValueError in Extract lookups that don't work properly with
DurationField.
-+-
 Reporter:  cecedille1   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by felixxm):

 * type:  Bug => Cleanup/optimization
 * easy:  0 => 1


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


Re: [Django] #30602: Raise ValueError in Extract lookups that don't work properly with DurationField.

2019-07-11 Thread Django
#30602: Raise ValueError in Extract lookups that don't work properly with
DurationField.
-+-
 Reporter:  cecedille1   |Owner:  Hasan
 |  Ramezani
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (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 Hasan Ramezani):

 * owner:  cecedille1 => Hasan Ramezani
 * has_patch:  0 => 1


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


Re: [Django] #30602: Raise ValueError in Extract lookups that don't work properly with DurationField. (was: ExtractYear lookups crash on a DurationField.)

2019-06-28 Thread Django
#30602: Raise ValueError in Extract lookups that don't work properly with
DurationField.
-+-
 Reporter:  cecedille1   |Owner:
 |  cecedille1
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (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 felixxm):

 * has_patch:  1 => 0


Comment:

 `DurationField` is modeled in Python by
 
[https://docs.python.org/3/library/datetime.html?highlight=timedelta#datetime.timedelta
 timedelta] (see
 [https://docs.djangoproject.com/en/2.2/ref/models/fields/#durationfield
 documentation]), so even with this fix it will always return 0 for
 `ExtractYear`,  `ExtractMonth`, or `ExtractWeek` which is unexpected. We
 should raise `ValueError` in all such cases.

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