parse() on an invalid time string no longer raises ValueError

Bug #1438242 reported by Adam Collard
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
High
Unassigned
dateutil
Fix Released
Undecided
Unassigned
python-dateutil (Ubuntu)
Fix Released
High
Unassigned

Bug Description

utopic:

⟫ python -c "from dateutil.parser import parse; parse('X')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 697, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 303, in parse
    raise ValueError, "unknown string format"
ValueError: unknown string format

vivid:
$ python -c "from dateutil.parser import parse; parse('X')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 748, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 310, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
TypeError: 'NoneType' object is not iterable

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: python-dateutil 2.2-2
ProcVersionSignature: User Name 3.19.0-10.10-generic 3.19.2
Uname: Linux 3.19.0-10-generic x86_64
ApportVersion: 2.16.2-0ubuntu5
Architecture: amd64
Date: Mon Mar 30 14:41:44 2015
PackageArchitecture: all
SourcePackage: python-dateutil
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Adam Collard (adam-collard) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-dateutil (Ubuntu):
status: New → Confirmed
Changed in python-dateutil (Ubuntu):
importance: Undecided → High
Changed in dateutil:
status: New → Confirmed
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Paul G (p-ganssle) wrote :

This bug was fixed in version 2.3. Current version of dateutil is 2.4.x

Changed in python-dateutil (Ubuntu):
status: Confirmed → Fix Released
Changed in hundredpapercuts:
status: Confirmed → Fix Released
Changed in dateutil:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.