[Python-checkins] python/dist/src/Modules timemodule.c,2.129,2.130

Barry A. Warsaw barry@zope.com
Fri, 19 Jul 2002 13:13:40 -0400


>>>>> "gvanrossum" ==   <gvanrossum@users.sourceforge.net> writes:

    | Update of /cvsroot/python/python/dist/src/Modules
    | In directory usw-pr-cvs1:/tmp/cvs-serv3342

    gvanrossum> Modified Files: timemodule.c Log Message: Patch to
    gvanrossum> call the Pure python strptime implementation if
    gvanrossum> there's no C implementation.  See SF patch 474274, by
    gvanrossum> Brett Cannon.

    gvanrossum> (As an experiment, I'm adding a line that #undefs
    gvanrossum> HAVE_STRPTIME, so that you'll always get the Python
    gvanrossum> version.  This is so that it gets some good exercise.
    gvanrossum> We should eventually delete that line.)

I've noticed one breakage already I believe.  On my systems (RH6.1 and
RH7.3) time.daylight as disappeared.

I don't think test_time.py actually tests this parameter, but
test_email.py which is what's failing for me:

-------------------- snip snip --------------------
test_email
test test_email failed -- Traceback (most recent call last):
  File "./Lib/test/test_email.py", line 1450, in test_formatdate_localtime
    self.assertEqual(
  File "/home/barry/projects/python/Lib/email/Utils.py", line 193, in formatdate
    if time.daylight and now[-1]:
AttributeError: 'module' object has no attribute 'daylight'
-------------------- snip snip --------------------
% ./python
Python 2.3a0 (#1, Jul 19 2002, 12:50:54) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
[17946 refs]
>>> time.daylight
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'daylight'
[17983 refs]
>>> 
[17983 refs]
[6651 refs]
-------------------- snip snip --------------------

-Barry