8.1.0 breaks parsing unicode strings with Python 2.7
Issue #28
resolved
The type checking logic introduced in 8.1.0 to prevent non-String data from being fed to the parse logic breaks the parsing of unicode strings in Python 2.7:
>>> parse_date('1980366')
datetime.date(1980, 12, 31)
>>> parse_date(unicode('1980366'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nielsenb/Desktop/test/lib/python2.7/site-packages/aniso8601/date.py", line 115, in parse_date
return _RESOLUTION_MAP[get_date_resolution(isodatestr)](isodatestr,
File "/home/nielsenb/Desktop/test/lib/python2.7/site-packages/aniso8601/date.py", line 27, in get_date_resolution
raise ValueError('Date must be string.')
ValueError: Date must be string.
Comments (2)
-
reporter -
reporter - changed status to resolved
Fixed in e9d5a0c.
- Log in to comment
8.1.1 has been released which should fix this issue.