Re: [Pyobjc-dev] Cannot import objc (pyobjc2.2)
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2010-01-12 09:53:59
|
On 10 Jan, 2010, at 16:59, Petr Mifek wrote: > Hi, > > I've run into this also, as anyone building and using on stock Leopard > would. It seems the problem is in pyobjc-core/Modules/objc/objc-class.m > at line 1547 (current trunk revision 2386) - there is a call to > PyType_Modified, which seems to be unavailable in Python 2.5 (as per > http://docs.python.org/c-api/type.html#PyType_Modified). > > As it is in there only at one place and (by my judgment) not very > important one, I hope there will be some quick fix possible. Or we > should raise the requirements to Python 2.6+. > > Made a bugreport at SF PyObjC tracker (id 2929331). I'll release pyobjc-core 2.2.1 with just this fix tonight. The next release of pyobjc (2.3) will almost certainly require python 2.6 for two reasons: first of all this makes my life a lot easier w.r.t. supporting both python 2.x and 3.x because of the b"...." literals. But more importantly: 2.6 introcudes an "__dir__" method and that allows me to optimize method lookup. PyObjC currently does a complete scan of classes whenever they are first used and has to resort to some (inefficient) trickery to ensure that the results of that scan get updated when the ObjC class changes (through categories, or other code performing dynamic updates of an ObjC class). The addition of an __dir__ method makes it possible to do away with this complete scan without losing the introspection capabilities of PyObjC. Ronald > > Cheers, > Petr > > > > Ronald Oussoren wrote: >> On 26 Nov, 2009, at 23:41, Orestis Markou wrote: >> >>> Hello, >>> >>> I'm trying to get pyobjc2.2 working on python2.5 in SL (in a virtualenv). I'm getting this strange failure: >>> >>> ImportError: dlopen(/Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so, 2): Symbol not found: _PyType_Modified >>> Referenced from: /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >>> Expected in: flat namespace >>> in /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >>> >> >> You're the second user that ran into this problem. I haven't had time yet to research the issue. >> >> Ronald >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> Join us December 9, 2009 for the Red Hat Virtual Experience, >> a free event focused on virtualization and cloud computing. >> Attend in-depth sessions from your desk. Your couch. Anywhere. >> http://p.sf.net/sfu/redhat-sfdev2dev >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |