[Pythonmac-SIG] How badly is _locale broken?
Bob Ippolito
bob at redivi.com
Thu Dec 30 00:24:14 CET 2004
On Dec 29, 2004, at 6:06 PM, Jack Jansen wrote:
>
> On 29-dec-04, at 11:32, Ronald Oussoren wrote:
>> I know that. But not linking with CoreServices should fix _locale for
>> python scripts that don't use mac-specific features.
>
> If I understand correctly it's the loading of CoreServices that causes
> the _locale problem, right? If that's indeed the case then I think not
> linking with CoreServices would make this problem even worse: imagine
> a scenario where an unsuspecting user has working code in a toy app,
> but it fails when used in his GUI app (which happens to use
> CoreServices). Or code that works standalone but not in <insert
> favorite IDE here>.
IIRC it's the CoreFoundation loader that abuses some private
functionality that forces the C locale. Simply faulting on any symbol
in CoreFoundation will cause this loader to run. I think CoreServices
uses CoreFoundation, which may have caused the confusion, but I'm
pretty sure it's a CoreFoundation issue.
Fortunately, the _locale module links to CoreFoundation (directly or
indirectly) anyway to get the current locale (or something like that).
The way it does things on current versions of OS X probably doesn't do
anything useful, but at least it's broken even with the reduced core
dependencies in Python 2.4.
-bob
More information about the Pythonmac-SIG
mailing list