[Python-Dev] test___all__ failing; Windows

Tim Peters tim.one@home.com
Wed, 24 Jan 2001 05:01:36 -0500

> python  ../lib/test/regrtest.py test___all__

test test___all__ crashed -- exceptions.AttributeError:
     'locale' module has no attribute 'LC_MESSAGES'

And indeed it does not:

> python
Python 2.1a1 (#9, Jan 24 2001, 04:40:55) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import locale
>>> dir(locale)
 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', '__all__', '__builtins__',
 '__doc__', '__file__', '__name__', '_build_localename', '_group',
 '_parse_localename', '_print_locale', '_setlocale', '_test', 'atof',
 'atoi', 'encoding_alias', 'format', 'getdefaultlocale', 'getlocale',
 'locale_alias', 'localeconv', 'normalize', 'resetlocale', 'setlocale',
 'str', 'strcoll', 'string', 'strxfrm', 'sys', 'windows_locale']

Nor is LC_MESSAGES std C (the other LC_XXX guys are).

I pin the blame on

    from _locale import *

in locale.py -- who knows what that's supposed to export?  Certainly not
Skip <wink>.