Title: test_formatdate_usegmt fails on non-englisch locale
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.0
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: oefe, r.david.murray, ronaldoussoren
Priority: normal Keywords:

Created on 2008-10-05 12:47 by oefe, last changed 2009-12-30 20:52 by r.david.murray. This issue is now closed.

Messages (4)
msg74343 - (view) Author: Martina Oefelein (oefe) Date: 2008-10-05 12:47
test_formatdate_usegmt (in fails if the environment 
variable LANG is set to a non-english locale.

Python 3.0rc1 on MacOSX 10.5.5

$ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/ -l 
1 test OK.

$ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/ -l 
test test_email failed -- Traceback (most recent call last):
  File "/Users/martina/Downloads/Python-
3.0rc1/Lib/email/test/", line 2139, in 
    time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now)))
AssertionError: 'Sun, 05 Oct 2008 12:44:04 -0000' != 'So, 05 Okt 2008 
12:44:04 -0000'

1 test failed:
msg97019 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-12-30 01:58
I'm not able to reproduce this problem, and I would not expect to be
able to, since LANG should have no effect unless setlocale is called,
which the regression tests should not be doing without restoring it
afterward (and which the tests are not doing at all if you just run

That said, I'm on linux, and issue 5125, which is also still open,
suggests this might be an OS X specific problem (maybe specific to
Apple's version of Python?).  Can you reproduce it with the
version of 3.1?
msg97041 - (view) Author: Martina Oefelein (oefe) Date: 2009-12-30 16:49
Apple doesn't ship py3k yet. I observed the issue originally with my own build of 3.0 RC1 (No particular build settings 
were used, just ./configure ; make ; make test). It also happens with the build of Python 3.0.1 that is installed on my 
machine (this should be the official MacOS X build from, on MacOS X 10.6.2.

It doesn't happen with Python 3.1 anymore (and neither with 2.6.1 and 2.7 Alpha 1).
msg97059 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-12-30 20:52
In that case, since 3.0 is no longer in maintenance, I'm closing this
bug as out of date.
Date User Action Args
2009-12-30 20:52:01r.david.murraysetstatus: open -> closed
resolution: out of date
messages: + msg97059

stage: resolved
2009-12-30 16:49:32oefesetmessages: + msg97041
2009-12-30 01:58:25r.david.murraysetpriority: normal
nosy: + r.david.murray, ronaldoussoren
messages: + msg97019

2008-10-05 12:47:16oefecreate