[Patches] [ python-Patches-706707 ] time.tzset standards compliance update
SourceForge.net
noreply@sourceforge.net
Sat, 29 Mar 2003 13:46:55 -0800
Patches item #706707, was opened at 2003-03-19 23:57
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=706707&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 7
Submitted By: Stuart Bishop (zenzen)
Assigned to: Neal Norwitz (nnorwitz)
Summary: time.tzset standards compliance update
Initial Comment:
Update to configure.in and test_time.py to only use TZ
environment variable format documented at
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-03-29 16:46
Message:
Logged In: YES
user_id=33168
In the last chunk added, there is a bare except when calling
time.tzset(). What are the possible exceptions? I don't
want to have a bare except since this can mask a real error.
The patch still fails for me on Linux (Redhat):
* line 107: self.failUnless(time.tzname[1] == 'AEDT')
- tzname has: ('AEST', 'AEST')
* line 109: self.failUnlessEqual(time.daylight, 1)
* line 111: self.failUnlessEqual(time.altzone, -39600)
Haven't tried on other Unixes.
----------------------------------------------------------------------
Comment By: Stuart Bishop (zenzen)
Date: 2003-03-27 15:12
Message:
Logged In: YES
user_id=46639
tzset3.diff is an updated diff against the CVS head.
Fixes:
-Don't test time.altzone for UTC - non-DST means altzone
is undefined
-Make sure dst timezone name is not the same as non-dst
timezone
name in TZ environment variable, to work around an
apparent Solaris
bug.
-Extraneous cruft removed from test_time.py and
configure.in - no
more irrelevant comments.
-More whitespace as per Tim's comments
comments.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-03-21 16:28
Message:
Logged In: YES
user_id=33168
After patching, the test fails:
File "/home/neal/build/python/2_3/Lib/test/test_time.py",
line 115, in test_tzset
self.failUnlessEqual(time.daylight,1)
File "/home/neal/build/python/2.3/Lib/unittest.py", line
292, in failUnlessEqual
raise self.failureException, \
AssertionError: 0 != 1
Also, why is the code commented out (via a string) on lines
120-144? Should these be removed? I see the comment about
wallclock time, but don't understand why the code should be
left in if we can't test it. I can understand a comment
describing generally the issue.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-03-20 20:18
Message:
Logged In: YES
user_id=33168
I'll try to get to this soon.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-03-20 20:11
Message:
Logged In: YES
user_id=6380
Unassigning, as I won't hve time for this. But it is
important - someone else should make sure this goes into 2.3b1!
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2003-03-20 16:50
Message:
Logged In: YES
user_id=31435
Assigned to Guido, as I can't test it.
Two notes:
1. Leaving commented-out code in config and the test suite
doesn't appear to serve a purpose, although it will serve to
confuse future readers ("why is this here? why is it
commented out?").
2. The Python style guide asks for a blank after commas in
argument lists and tuples. We're not really in danger of
stretching the screen here <wink>.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=706707&group_id=5470