[issue10092] calendar does not restore locale properly

Stephen Hansen report at bugs.python.org
Wed Oct 20 08:15:50 CEST 2010


Stephen Hansen <me+python at ixokai.io> added the comment:

I can't be entirely sure, because a) I have never even glanced at the calendar module, and b) my locale-fu is very weak, but my buildbot has consistently failed on this test since this commit:


======================================================================
ERROR: test_localecalendars (test.test_calendar.CalendarTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_calendar.py", line 264, in test_localecalendars
    locale=def_locale).formatmonthname(2010, 10, 10)
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py", line 520, in formatmonthname
    with different_locale(self.locale):
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py", line 490, in __enter__
    _locale.setlocale(_locale.LC_TIME, self.locale)
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/locale.py", line 538, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

I will look into it in more detail tomorrow to try to provide more meaningful feedback, but I think this "fix" has introduced a problem. If someone sees what before I have time to dig into this unfamiliar territory, yay. :)

----------
nosy: +ixokai

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10092>
_______________________________________


More information about the Python-bugs-list mailing list