Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote: ... If I have understood the code correctly in zope.deferredimport the problem which zope.proxy.ProxyBase answers is in the following snippet from z.deferredimport.deferredmodule:initialize [1] where a type(module) comparison is made. Therefore, if I could understand fully Jim's statement: the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type Then I could attempt to substitute pure-python code for the type(module) problem which appears in the `initialize` method. I'm not sure what you mean. The idea is to provide a pure-python implementation of ModuleProxy. ModuleProxy doesn't have to be as complete as zope.proxy allows. The need for a proxy is due to the inspect module's use of isinstance. isinstance in turn uses an object's __class__ attribute, which a proxy can override. I hope this hint helps. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Sun, 2008-04-20 at 12:42 -0400, Jim Fulton wrote: On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote: ... If I have understood the code correctly in zope.deferredimport the problem which zope.proxy.ProxyBase answers is in the following snippet from z.deferredimport.deferredmodule:initialize [1] where a type(module) comparison is made. Therefore, if I could understand fully Jim's statement: the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type Then I could attempt to substitute pure-python code for the type(module) problem which appears in the `initialize` method. I'm not sure what you mean. The idea is to provide a pure-python implementation of ModuleProxy. ModuleProxy doesn't have to be as complete as zope.proxy allows. The need for a proxy is due to the inspect module's use of isinstance. isinstance in turn uses an object's __class__ attribute, which a proxy can override. Yes, I was off track a little with my last mail. I did get that I need to replace ModuleProxy as you say. I'm trying to figure just what is required of the ModuleProxy class (if not to be as complete as zope.proxy.ProxyBase). I'm not doing very well with understanding _zope_proxy_proxy.c to even figure out what ProxyBase does provide. I hope this hint helps. Well, yes. But I think the task may be beyond my level of understanding. Regards, Darryl Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Hello Darryl, I think zope.interface will work without the C stuff, those are just optimizations. Actually it should work with jython already. zope.proxy might not be so simple to get working without C. (Hopefully) there will be some GSoC projects that will bring the subject and your problem forward: - Porting zope 3 to jython: http://www.gossamer-threads.com/lists/zope/dev/213430 - Zope without ZODB Saturday, April 19, 2008, 1:43:19 AM, you wrote: DC Hi, DC The ZCA framework is developed as part of the Zope 3 project. As noted DC earlier, it is a pure Python framework, so it can be used in any kind of DC Python application. [1] DC I was hoping to try using ZCA for a googleappengine experiment. Using DC Ian Bickings post [2] I set up a environment to install zca packages. DC zope.interface and zope.proxy both have .so files that aren't usable in DC a gae project. (_zope_interface_coptimizations.so and DC _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there DC exist pure-python ZCA packages. Could someone point me to where to find DC them? DC Best regards, DC Darryl DC [1] http://www.muthukadan.net/docs/zca.html DC [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ -- Best regards, Adam GROSZERmailto:[EMAIL PROTECTED] -- Quote of the day: Any fool can criticize, condemn, and complain - and most fools do. - Dale Carnegie ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
[Incorrect `from` header in initial] Hello Darryl, I think zope.interface will work without the C stuff, those are just optimizations. Actually it should work with jython already. zope.proxy might not be so simple to get working without C. Thanks. You are right. Silly of me not to try one or the other. If I omit `import zope.component`, `import zope.interface` works without error. Otherwise with zope.component: File /opt/google_appengine/tfws/lib/python2.5/site-packages/zope.proxy-3.4.0-py2.5-linux-i686.egg/zope/proxy/__init__.py, line 20, in module from zope.proxy._zope_proxy_proxy import * ImportError: No module named _zope_proxy_proxy Regards, Darryl (Hopefully) there will be some GSoC projects that will bring the subject and your problem forward: - Porting zope 3 to jython: http://www.gossamer-threads.com/lists/zope/dev/213430 - Zope without ZODB Saturday, April 19, 2008, 1:43:19 AM, you wrote: DC Hi, DC The ZCA framework is developed as part of the Zope 3 project. As noted DC earlier, it is a pure Python framework, so it can be used in any kind of DC Python application. [1] DC I was hoping to try using ZCA for a googleappengine experiment. Using DC Ian Bickings post [2] I set up a environment to install zca packages. DC zope.interface and zope.proxy both have .so files that aren't usable in DC a gae project. (_zope_interface_coptimizations.so and DC _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there DC exist pure-python ZCA packages. Could someone point me to where to find DC them? DC Best regards, DC Darryl DC [1] http://www.muthukadan.net/docs/zca.html DC [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ -- Best regards, Adam GROSZERmailto:[EMAIL PROTECTED] -- Quote of the day: Any fool can criticize, condemn, and complain - and most fools do. - Dale Carnegie ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
[incorrect from header in initial] Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Doing some *cleverer* googling: https://bugs.launchpad.net/zope3/+bug/204027 Cheers Nicholas, I haven't tried the patch yet but that may get me going with zope.interface. This is a recent post. 2008-03-19. On zope.proxy, I found this: http://article.gmane.org/gmane.comp.web.zope.zope3/13706 Darryl. Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Here's a high-level response to this thread. As others have pointed out, zope.component and zope.interface should work fine without the C optimizations and I'm in favor of changing the setup to make them installable without the optimizations. zope.proxy is harder. :( What's especially sad is that the dependency on it is rather unimportant. It is used by zope.deferredimport. I was forced to use proxies because of annoying limitations in Python's module implementation and the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type. I expect though that a simpler proxy implementation could be used by deferredimport. This would make zope.component depend on zope.proxy only if the annoying zcml is used. I'd love to see both of the above fixed, but, sadly, don't have time to fix them myself any time soon. Jim On Apr 18, 2008, at 7:43 PM, Darryl Cousins wrote: Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Sat, 2008-04-19 at 09:30 -0400, Jim Fulton wrote: Here's a high-level response to this thread. As others have pointed out, zope.component and zope.interface should work fine without the C optimizations and I'm in favor of changing the setup to make them installable without the optimizations. zope.proxy is harder. :( What's especially sad is that the dependency on it is rather unimportant. It is used by zope.deferredimport. I was forced to use proxies because of annoying limitations in Python's module implementation and the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type. I expect though that a simpler proxy implementation could be used by deferredimport. This would make zope.component depend on zope.proxy only if the annoying zcml is used. I'd love to see both of the above fixed, but, sadly, don't have time to fix them myself any time soon. Thanks Jim for your comment. Darryl Jim On Apr 18, 2008, at 7:43 PM, Darryl Cousins wrote: Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Hi there, Another high-level response. I actually *hope* that the port Zope packages to Jython project will be accepted for the Google Summer of Code. If it does, the python versions of this code will be given a good workout by the student, which should benefit other porting projects as well. cc-ing the student. Georgy, if you aren't aware yet, please check out this thread on zope3-users; it may have some interesting information for your project. Regards, Martijn ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users