This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients BreamoreBoy, flox, loewis, neologix, schmir, vdupras
Date 2011-10-31.10:55:15
SpamBayes Score 1.547773e-07
Marked as misclassified No
Message-id <1320058516.68.0.296768369284.issue2979@psf.upfronthosting.co.za>
In-reply-to
Content
2096158376e5 broke test_xmlrpc:

"""
======================================================================
ERROR: test_datetime_before_1900 (test.test_xmlrpc.XMLRPCTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cf/python/cpython/Lib/test/test_xmlrpc.py", line 62, in test_datetime_before_1900
    (newdt,), m = xmlrpclib.loads(s, use_datetime=1)
  File "/home/cf/python/cpython/Lib/xmlrpc/client.py", line 969, in loads
    p.feed(data)
  File "/home/cf/python/cpython/Lib/xmlrpc/client.py", line 430, in feed
    self._parser.Parse(data, 0)
  File "/home/cf/python/cpython/Lib/xmlrpc/client.py", line 662, in end
    return f(self, "".join(self._data))
  File "/home/cf/python/cpython/Lib/xmlrpc/client.py", line 745, in end_dateTime
    value = _datetime_type(data)
  File "/home/cf/python/cpython/Lib/xmlrpc/client.py", line 359, in _datetime_type
    return datetime.strptime(data, "%Y%m%dT%H:%M:%S")
  File "/home/cf/python/cpython/Lib/_strptime.py", line 488, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/home/cf/python/cpython/Lib/_strptime.py", line 337, in _strptime
    (data_string, format))
ValueError: time data '10210T11:41:23' does not match format '%Y%m%dT%H:%M:%S'

----------------------------------------------------------------------
"""

That's because datetime.strptime() expects a year ("%Y") on exactly 4 digits:
"""
            #XXX: Does 'Y' need to worry about having less or more than
            #     4 digits?
            'Y': r"(?P<Y>\d\d\d\d)",
"""
History
Date User Action Args
2011-10-31 10:55:16neologixsetrecipients: + neologix, loewis, schmir, vdupras, flox, BreamoreBoy
2011-10-31 10:55:16neologixsetmessageid: <1320058516.68.0.296768369284.issue2979@psf.upfronthosting.co.za>
2011-10-31 10:55:16neologixlinkissue2979 messages
2011-10-31 10:55:15neologixcreate