Author ezio.melotti
Recipients ezio.melotti, vincent.chute
Date 2009-02-20.03:08:07
SpamBayes Score 7.61445e-07
Marked as misclassified No
Message-id <>
FWIW the type("") is gone in Py3, now it is:
"if locale and not isinstance(locale, _builtin_str):"
where "from builtins import str as _builtin_str"

However Py3.0 now raises the same error when the second arg is a byte
>>> locale.setlocale(locale.LC_ALL, b'ja_JP.utf8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Programs\Python30\lib\", line 500, in setlocale
    locale = normalize(_build_localename(locale))
  File "C:\Programs\Python30\lib\", line 408, in _build_localename
    language, encoding = localetuple
ValueError: too many values to unpack

On Py3, locale.setlocale() should allow only unicode strings and reject
byte strings.
Date User Action Args
2009-02-20 03:08:11ezio.melottisetrecipients: + ezio.melotti, vincent.chute
2009-02-20 03:08:11ezio.melottisetmessageid: <>
2009-02-20 03:08:09ezio.melottilinkissue3067 messages
2009-02-20 03:08:07ezio.melotticreate