[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

Ronald Oussoren report at bugs.python.org
Tue Mar 31 15:28:30 CEST 2015


Ronald Oussoren added the comment:

1) I agree with Ned that the OSX behavior is not broken, it is different but within spec. Python makes assumption about the format of locale names that aren't universally valid.

2) We should be careful in using CFLocale. Those APIs are part of CoreFoundation and CoreFoundation APIs cannot be used in the child proces after calling os.fork. 

As an aside to 2), CoreFoundation and any other Apple "Cocoa" frameworks should be assumed to use threads and hence the comment about threads in the fork specification (link below) apply, and currently Apple doesn't appear to use pthread_atfork to make sure library state is valid in child processes after fork.

<http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18378>
_______________________________________


More information about the Python-bugs-list mailing list