Re: [Pyobjc-dev] NSSet valueForKey: breaks when using py2app
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2005-11-02 23:12:12
|
On Nov 2, 2005, at 2:29 PM, Ronald Oussoren wrote: > > On 2-nov-2005, at 22:59, Bob Ippolito wrote: > > >> >> On Nov 2, 2005, at 1:46 PM, Phil Frost wrote: >> >> >>> I can't find any place that documents this behaviour for NSSet, >>> but it >>> is documented for NSArray. Dispite being undocumented, it works >>> in every >>> context I have tried except py2app. I suspect it was implemented for >>> CoreData as to-many relationships are represented as sets there. >>> >>> My only guess is that for some reason py2app is not loading >>> something >>> that is being loaded otherwise. I don't know much about the >>> details of >>> the objc runtime, or how libraries are loaded, or how py2app >>> works, so I >>> don't know where to look to solve this problem. Could anyone >>> please give >>> me some ideas? >>> >> >> Compare sorted(sys.modules) and sys.version_info with and without >> py2app. >> > > For the record: I can reproduce this. Running python2.3 __boot__.py > inside the bundle works just fine (even with PYTHONPATH set to a > value that forces loading from the site-packages.zip inside the > bundle), running .../MacOS/dew gives the error. > > A difference between the two is that the bootstrap executable was > linked on Panther. The bootstrap executable and _Foundation.so seem > to link to a different version of Foundation according to otool -vL. > > _Foundation.so: > /System/Library/Frameworks/Foundation.framework/Versions/C/ > Foundation (compatibility version 300.0.0, current version 567.21.0) > > bootstrap executable: > /System/Library/Frameworks/Foundation.framework/Versions/C/ > Foundation (compatibility version 300.0.0, current version 500.59.0) > > It could well be that this is relevant. Someone could rebuild the > bootstrap executable on Tiger and check if that solves the problem. That's probably it. It's an interesting issue -- I wonder what the best solution to this would be. Bill should probably speak up here, he'd know more about this garbage link-time behavior change stuff :) I guess one possible solution is to rewrite the bootstrap in C and use carbon dialogs or a separate executable to do errors.. but that sucks. -bob |