[Python-Dev] cygwin errors

Brett C. drifty@alum.berkeley.edu
Tue, 22 Jul 2003 13:21:32 -0700

Tim Peters wrote:

> [Jason Tishler]
>>Just to confirm, the above is Win32 Python -- not Cygwin.  Right?
> Yes, it was Win32 Python -- and also Jeremy's Linux.  It "got fixed" by
> focing the locale to "C" at the end of test_logging.py.  That's probably not
> a correct fix, just a bandaid.  Brett is on vacation, and I have no real
> idea what strptime is trying to do with locale; it appears to be a bug that
> strptime tries to be locale-independent but that the strptime test in
> test_time.py fails if test_logging (which changes the locale) isn't hacked
> to force locale (back?) to "C" at its end.

_strptime just uses locale to find out what language is used so as to 
make sure that improper info is not used if the language is changed 
between calls to time.strptime .  I don't use it for anything else nor 
do I touch any settings.  If there are any issues it probably is in 
time.strftime which uses the locale info much more.  I can try to see 
what the problems are if someone can run::

 >>> import time
 >>> time.strftime("%c")
 >>> import _strptime
 >>> _strptime.TimeRE()['c']

after running test_logging to trigger the failure.  That will give me 
what strftime thinks the format for "%c" is and what strptime thinks it 
should be.