Issue1668

classification
Title: strptime('','') works on cpython but not on jython
Type: behaviour Severity: minor
Components: Library Versions: 2.5.1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: itsadok, pjenvey
Priority: Keywords: patch

Created on 2010-10-25.16:41:44 by itsadok, last changed 2010-12-29.01:59:27 by pjenvey.

Files
File name Uploaded Description Edit Remove
issue1668.patch itsadok, 2010-10-26.08:39:21
Messages
msg6206 (view) Author: Israel Tsadok (itsadok) Date: 2010-10-25.16:41:42
itsadok@dev001:~$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime('','')
time.struct_time(tm_year=1900, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=1, tm_isdst=-1)
>>> 
itsadok@dev001:~$ jython
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) 
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_14
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime('','')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: time data did not match format:  data=  fmt=
>>>
msg6209 (view) Author: Israel Tsadok (itsadok) Date: 2010-10-26.08:39:20
I honestly don't know how much matching cpython's unspecified behavior is a goal of jython, but here's a little patch that resolves this issue.
msg6306 (view) Author: Philip Jenvey (pjenvey) Date: 2010-12-29.01:59:27
applied in r7181, thanks
History
Date User Action Args
2010-12-29 01:59:27pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg6306
2010-12-29 01:45:17pjenveysetassignee: pjenvey
nosy: + pjenvey
2010-10-26 08:39:22itsadoksetfiles: + issue1668.patch
keywords: + patch
messages: + msg6209
2010-10-25 16:41:44itsadokcreate