This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author David.Edelsohn
Recipients David.Edelsohn, lemburg, trent, vstinner
Date 2013-06-17.00:14:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371428058.77.0.804412946112.issue18228@psf.upfronthosting.co.za>
In-reply-to
Content
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:
History
Date User Action Args
2013-06-17 00:14:19David.Edelsohnsetrecipients: + David.Edelsohn, lemburg, vstinner, trent
2013-06-17 00:14:18David.Edelsohnsetmessageid: <1371428058.77.0.804412946112.issue18228@psf.upfronthosting.co.za>
2013-06-17 00:14:18David.Edelsohnlinkissue18228 messages
2013-06-17 00:14:18David.Edelsohncreate