David Edelsohn added the comment:

The problem is Lib/test/regrtest.py.

_lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_')]

The list of locales that start with 'LC_' includes LC_ALL.  On AIX, at least, 
setlocal("LC_ALL",NULL) returns a string with the locales for each locale 
category.  Lib/locale.py for getlocale() specifically says:
"category may be one of the LC_* value except LC_ALL."

The following patch fixes the AIX testing problem.

diff -r bdd60bedf933 Lib/test/regrtest.py
--- a/Lib/test/regrtest.py      Sun Jun 16 18:37:53 2013 -0400
+++ b/Lib/test/regrtest.py      Sun Jun 16 22:05:52 2013 -0700
@@ -1231,7 +1231,7 @@
             elif os.path.isdir(support.TESTFN):
                 shutil.rmtree(support.TESTFN)
 
-    _lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_')]
+    _lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_') 
and lc != 'LC_ALL']
     def get_locale(self):
         pairings = []
         for lc in self._lc:

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to