[Python-Dev] Dealing with test__locale failure on OS X before a3

Brett C. bac at OCF.Berkeley.EDU
Thu Aug 26 21:02:14 CEST 2004


test__locale has been failing on OS X for quite a while now (I bet ever 
since we started compiling against the CoreFoundation framework since 
that is where the problem exists).  I would  like to deal with it before 
a3 goes out in case we need to change something semantically.

Bug http://www.python.org./sf/1005113 has most of the details. 
Basically it looks like Apple locks down the locale so that it can't be 
change through locale.h .  This means that all attempts to change the 
locale just fails silently.  Obviously this sucks.  I do have a contact 
at Apple who said it looks like it the function that caused this issue 
has been removed from the tree they are working with for Tiger, but that 
can obviously change and they could also have just moved the 
functionality to another function.

There are a few options on how to deal with this.  One is to just turn 
off test__locale for OS X.  We do this for test_locale already so 
skipping locale tests on OS X already has a precedent.

We can raise locale.Error on OS X for all attempts to set the locale. 
Problem I have with this is I don't know if this problem exists in other 
versions of OS X beyond 10.3 (test__locale passing for anyone on other 
OS X versions?).

Last option is to try to fix it so that we set the locale through 
CoreFoundation.  I have no clue how doable this is (quick searching 
turned up 
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFLocales/index.html 
so it might be possible).  Problem is I know I can't get it in before 
a3.  Possibly before b1, but no guarantee.  And of course this is 
assuming this works the way we need it to which it might not.

Personally I would like to turn off the test on OS X for now and then 
try to see if there is a proper way to solve this.

-Brett


More information about the Python-Dev mailing list