This is a bit strange.
$ ./python ../Lib/test/regrtest.py test__locale
test__locale
test test__locale failed -- Traceback (most recent call
last):
File
"/home/mwh/src/python/dist/src/Lib/test/test__locale.py",
line 37, in test_lc_numeric
"%r != %r (%s); "
File "/home/mwh/src/python/dist/src/Lib/locale.py",
line 363, in getlocale
return _parse_localename(localename)
File "/home/mwh/src/python/dist/src/Lib/locale.py",
line 278, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: lv_LV
1 test failed:
test__locale
[13925 refs]
Redhat 9, CVS as of a few minutes ago.
The same problem, interactively:
>>> import _locale, locale
[27114 refs]
>>> _locale.setlocale(_locale.LC_NUMERIC, 'lv_LV')
'lv_LV'
[27155 refs]
>>> locale.getlocale(locale.LC_NUMERIC)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/mwh/src/python/dist/src/Lib/locale.py",
line 363, in getlocale
return _parse_localename(localename)
File "/home/mwh/src/python/dist/src/Lib/locale.py",
line 278, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: lv_LV
[27170 refs]
setlocale() succeeds but subsequent getlocale()s fail,
it seems.
The test failure is fairly new, but the behaviour may
be older, I guess.
|