Roundup Robot added the comment:
New changeset c1e9a1fc6931 by Georg Brandl in branch 'default':
Closes #15925: fix regression in parsedate() and parsedate_tz() that should
return None if unable to parse the argument.
http://hg.python.org/cpython/rev/c1e9a1fc6931
--
stage: commit
Roundup Robot added the comment:
New changeset 3b03d31f6a79 by R David Murray in branch 'default':
#15925: fix regression: return None for null and non-date strings.
http://hg.python.org/cpython/rev/3b03d31f6a79
--
nosy: +python-dev
___
Python
R. David Murray added the comment:
I don't think it is worth the extra code to convert the TypeError into a
ValueError. We aren't very strict about the distinction between those two.
Leaving this open for Georg to transplant it to 3.3.0.
--
assignee: - georg.brandl
resolution: -
Georg Brandl added the comment:
This was committed to the release clone as c1e9a1fc6931.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15925
___
Changes by Georg Brandl ge...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15925
___
___
Python-bugs-list
Arfrever Frehtes Taifersar Arahesis added the comment:
I think that email.utils.parsedate_to_datetime(0) should raise ValueError
instead of TypeError.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15925
R. David Murray added the comment:
Oh, and I'm purposely allowing parsedate_to_datetime throw exceptions. I
suppose that should be documented, but that's a separate issue.
--
title: email.utils.parsedate(), email.utils.parsedate_tz() and
email.utils.parsedate_to_datetime() should