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.

classification
Title: test_output_textcalendar fails on non-englisch locale
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, oefe, r.david.murray
Priority: normal Keywords:

Created on 2008-10-05 12:18 by oefe, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg74339 - (view) Author: Martina Oefelein (oefe) Date: 2008-10-05 12:18
test_output_textcalendar (in test_calendar.py) fails if the environment 
variable LANG is set to a non-english locale.

Python 3.0rc1 on MacOSX 10.5.5

$ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l 
test_calendar
test_calendar
test test_calendar failed -- errors occurred; run in verbose mode for 
details
1 test failed:
    test_calendar
$ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l 
test_calendar
test_calendar
1 test OK.
msg109565 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-08 18:35
It would be a lot of work to fix this as the month names are hardcoded in English in test_calendar.py
msg109755 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-09 15:44
This passes for me on linux (2.7), which is what I would expect, since the locale should not actually affect a python program unless locale.setlocale is called, which regrtest doesn't do.

I also tried OSX 2.7+, and the 10.4 system python (2.6.1).  test_calendar passed using the specified command line in all cases.

Can anyone reproduce this issue?
msg109787 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-09 19:13
As mentioned in #4045, I believe this is a problem with the user's local Python setup and not a Python bug.
msg110019 - (view) Author: Martina Oefelein (oefe) Date: 2010-07-11 14:44
Did you test it Python *3.0*? Apparently, the issue does not happen in Python 2.x, and also not in Python 3.1.2.

Apparently it was introduced somewhere in Python 3.0, and later fixed. 

I retested the issue in Python 3.0.1 on Mac OS X 10.6.4, using a freshly unpacked tarball, built with

./configure && make

and it still happens. To avoid influences of the user environment, I repeated the test in a newly created test account. Same issue.

The issue doesn't happen in Python 2.6, 2.6.5, 2.7, or 3.1.2, however.
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48294
2010-07-11 14:55:46r.david.murraysetresolution: works for me -> out of date
2010-07-11 14:44:30oefesetmessages: + msg110019
2010-07-09 19:13:56r.david.murraysetstatus: pending -> closed

messages: + msg109787
2010-07-09 15:44:32r.david.murraysetstatus: open -> pending

nosy: + r.david.murray
messages: + msg109755

resolution: works for me
stage: resolved
2010-07-08 18:35:18BreamoreBoysetnosy: + BreamoreBoy

messages: + msg109565
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
2008-10-05 12:18:46oefecreate