Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-06-29 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akki):

 * owner:  akki =>
 * status:  assigned => new


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-06-03 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


Comment:

 Added some comments for improvement on the 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/079.89c27e9659dcd6a5b963820216e119fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-06-02 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   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 phildini):

 * stage:  Accepted => Ready for checkin


Comment:

 The patch looks good, is documented, and has tests.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-05-14 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (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 claudep):

 * needs_better_patch:  1 => 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/079.2654959021f0f64b3376b50938fe3836%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-05-10 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akki):

 @claudep I have updated my [https://github.com/django/django/pull/6468
 PR]. Please see if that agrees with what you were looking for.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-04-18 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-04-18 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (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
-+-

Comment (by claudep):

 @akki Could you also explore the duck-typing strategy? See
 https://gist.github.com/claudep/1ec5600d7232bb8007862014a5607c07

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-04-16 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (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 akki):

 * needs_better_patch:  1 => 0


Comment:

 PR: https://github.com/django/django/pull/6468

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2016-04-16 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  akki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akki):

 * owner:   => akki
 * status:  new => assigned


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2015-11-18 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by auvipy):

 * owner:  auvipy =>
 * status:  assigned => new


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2015-03-30 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  auvipy
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2015-03-07 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  auvipy
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (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 auvipy):

 * owner:  nobody => auvipy
 * status:  new => assigned


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2014-12-26 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.6
  (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 timgraham):

 * needs_better_patch:  1 => 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/079.d53ab98c50ef2c18f166e15265513a37%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2014-08-14 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by claudep):

 I've created the ticket #23289 to discuss `mock` availability in the test
 suite.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2014-08-13 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 The latest [https://github.com/django/django/pull/2027 PR] uses the mock
 library which I don't think we want. Not sure of the merits of the patch
 and this idea is probably outside the scope of this ticket, but I wonder
 if it might be worth vendoring `unittest.mock` from Python 3.3+ so we can
 use it in our tests and have 2.7/3.2 support.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2014-08-13 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by timgraham):

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2014-01-27 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Database layer   |   Resolution:
  (models, ORM)  | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by carljm):

 * type:  Uncategorized => Cleanup/optimization


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-12-08 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by aaugustin):

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-12-04 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by hugorodgerbrown):

 I've submitted a PR for this (https://github.com/django/django/pull/2026)
 - but I've gone off message slightly in using `hasattr(value,
 'isoformat')` instead of `tzinfo` or `strftime` as suggested above.

 This way, we maintain the `isinstance(value, datetime.datetime)` and
 `isinstance(value, datetime.date)` checks as-is, but if the object fails
 both of those, and has an `isoformat`atribute it gets converted into a
 string and then parsed using `parse_date` as currently happens. Using
 `isoformat` instead of `str` or `smart_str` seems tighter, as if an object
 has such an attribute it's a reasonable assumption to assume that it
 thinks it's a date (as opposed to `str`).

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-12-02 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * stage:  Unreviewed => Accepted


Comment:

 I took more time to think about this issue today. `to_python` methods are
 highly sensitive and we shouldn't change them lightly.

 The real question is the contract of the `to_python` method:

 - Should it accept ''anything'' and never crash?
 - Should it guarantee that its result is a suitable Python value for the
 field?

 Of course these are incompatible goals. Taking them to the extreme, the
 former means that `to_python` should return unknown types (such as mocks)
 unchanged and hope duck-typing does the rest; the latter that it should
 reject them like it currently does.

 At this point, restoring a call to `str` and adding tests starts looking
 like a good compromise. A date-like object is likely to have an
 unambiguous string representation in the -MM-DD format.

 If we're specifically thinking about mocks, `__isinstancecheck__` is the
 answer because it's the way to declare "I pretend I'm this other class".
 But if we're also thinking about date-like objects provided by arbitrary
 libraries, it makes more sense to rely on `__str__` than
 `__isinstancecheck__`.

 Over the years, Django has moved towards more type safety (and I'm partly
 responsible for that). For instance it's less forgiving when you mix dates
 and datetimes. But in this case I believe the robustness principle trumps
 our (my?) desire for correctness.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-30 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 `__isinstancecheck__` is indeed designed for this purpose.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-30 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 OK - I've found a workaround to my specific issue (overriding the
 __instancecheck__ so that real date objects return True to the
 isinstance(value, datetime.date) check when datetime.date is mocked out),
 but this feels like an even bigger hack that my original one. That said,
 I'm happy to drop this issue if people think it's invalid.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-29 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 I've gone down a bit of a rabbit hole on this one - in principle mocking
 can work if you can trap every single instance where a date is created -
 so not just `init` and `today()`, but also operators (as adding timedeltas
 to dates creates a 'real' date as opposed to the mock), parsing dates
 using datetime.datetime.strptime (as it exists on a
 django.forms.DateField), etc.

 I'm prepared to side with claudep on this that the removal of smart_str
 may have simply thrown light on an existing issue of mocking complexity
 rather than a bug per se, and that therefore this doesn't merit
 acceptance. That said, the `hasattr` suggestion (rather that `isinstance`)
 would certainly make life easier.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-29 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * cc: charettes (added)


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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-29 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 Replying to [comment:9 charettes]:
 > I'm not sure of the actual issue here?
 >
 > {{{
 > #!python
 > import datetime
 > from django.db import models
 >
 > class FakeDate(datetime.date):
 > @classmethod
 > def today(cls):
 > return cls(2000, 1, 1)
 >
 > assert models.DateField().to_python(FakeDate.today()) ==
 datetime.date(2000, 1, 1)
 > }}}

 Hi there - this code works fine - but the problem appears when using it
 within a test / mock scenario, as mocking the datetime.date affects the
 `datetime.date(2000, 1, 1)` expression also (i.e. it returns a mock, not a
 genuine date).

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-29 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 Replying to [comment:10 charettes]:
 > > If anyone has any alternative solutions to mocking datetime.date(time)
 classes
 > > I'd love to hear about it.
 >
 > You should be able to decorate your test methods with `@today(2000, 1,
 1)` using the following class:
 >
 > {{{#!python
 > import datetime
 > from functools import wraps
 >
 > class today(object):
 > def __init__(*args):
 > mocked_today = datetime.date(*args)
 > self.mocked_date_cls = type(
 > 'mocked_date_cls', (datetime.date,),
 > {'today': staticmethod(lambda: mocked_today)}
 > )
 >
 > def __call__(func):
 > @wraps(func)
 > def wrapper(*args, **kwargs):
 > with mock.patch('datetime.date', self.mocked_date_cls):
 > return func(*args, **kwargs)
 > return wrapper
 > }}}

 Thanks for this - unfortunately this appears to have reversed the issue.
 The tests still fail on the `isinstance(value, datetime.date)` call inside
 `to_python`:

 {{{#!python
 > /django/db/models/fields/__init__.py(698)to_python()
 697
 --> 698 try:
 699 parsed = parse_date(value)

 ipdb> value
 datetime.date(2012, 12, 7)
 ipdb> isinstance(value, datetime.date)
 False
 ipdb> type(value)
 
 ipdb> dt = datetime.date(2012, 12, 7)
 ipdb> dt
 mocked_date_cls(2012, 12, 7)
 }}}

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 > If anyone has any alternative solutions to mocking datetime.date(time)
 classes
 > I'd love to hear about it.

 You should be able to decorate your test methods with `@today(2000, 1, 1)`
 using the following class:

 {{{#!python
 import datetime
 from functools import wraps

 class today(object):
 def __init__(*args):
 mocked_today = datetime.date(*args)
 self.mocked_date_cls = type(
 'mocked_date_cls', (datetime.date,),
 {'today': staticmethod(lambda: mocked_today)}
 )

 def __call__(func):
 @wraps(func)
 def wrapper(*args, **kwargs):
 with mock.patch('datetime.date', self.mocked_date_cls):
 return func(*args, **kwargs)
 return wrapper
 }}}

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 I'm not sure of the actual issue here?

 {{{
 #!python
 import datetime
 from django.db import models

 class FakeDate(datetime.date):
 @classmethod
 def today(cls):
 return cls(2000, 1, 1)

 assert models.DateField().to_python(FakeDate.today()) ==
 datetime.date(2000, 1, 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/079.3beaaf0322d58cd7462e54871de5ae56%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by claudep):

 Replying to [comment:6 hugorodgerbrown]:
 > If anyone has any alternative solutions to mocking datetime.date(time)
 classes
 > I'd love to hear about it.

 You should generally be able to manually monkeypatch with this pattern:
 {{{
 from datetime import date

 def test_something(self):
 old_today = date.today
 date.today = 
 try:
 # Your testing code here
 finally:
 date.today = old_today

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by claudep):

 One possible fix would be to replace (in `DateField.to_python`) `if
 isinstance(value, datetime.datetime)` by `if hasattr(value, 'tzinfo')`,
 and similarly replace `if isinstance(value, datetime.date)` by `if
 hasattr(value, 'strftime')`, `tzinfo` and `strftime` being only suggestion
 of possible attribute testing. This would be more mocking-friendly at
 least, and maybe a little more Pythonic.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 Happy for it to not be accepted (I don't have strong feelings either way
 about the fix),
 however not being able to mock DateField or DateTimeField values is fairly
 terminal
 for us; our application is very heavily date-dependent, and we need to be
 able to
 run deterministic date-based tests.

 If anyone has any alternative solutions to mocking datetime.date(time)
 classes
 I'd love to hear about it.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by claudep):

 The fact that `smart_str`/`smart_text` is fixing this issue is only
 accidental. I'm the one who removed the `smart_str` calls and I am
 strongly opposed to reintroduce them (and that for a third-party testing
 utility). I can admit that this is a typical case where `isinstance` can
 be harmful. In your use case, the basic problem is that `isinstance(value,
 datetime.date)` returns False when value is mocked.
 I'm not sure we should even accept this ticket, but I'd like to hear the
 opinion of another core dev.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 I have attached a patch for this. It adds a call to smart_text back in to
 the DateField and DateTimeField to_python methods. Patch also includes
 test for this.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugorodgerbrown):

 The commit that removed the smart_str call is [0dc9049] (31-May-2012),
 which
 is marked as a fix for another issue (#18407). Commit note below.

 Fixed #18407 -- Made model field's to_python methods fully accept unicode.

 When generating error message in to_python, any unicode string
 containing non-ascii characters triggered a UnicodeEncodeError for
 most field types.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by hugo@…):

 I haven't written formal tests for this, but initial tests demonstrate
 that adding a call to django.utils.encoding.smart_text before attempting
 to parse_date will fix this.

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


Re: [Django] #21523: Models DateField to_python method no longer supports mock dates.

2013-11-28 Thread Django
#21523: Models DateField to_python method no longer supports mock dates.
-+-
 Reporter:  hugo@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by hugo@…):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Database layer (models, ORM)
 * needs_tests:   => 0
 * needs_docs:   => 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/079.b4232a8ed985a7441ea13e3d108a6c22%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.