This is a quick and dirty change and to be honest the main reason I am
posting it here is so there is a searchable record
for anyone else who wants to use zope.deferredimport under google app
engine. (With some content models
zope.deferredimport is a great way of dealing with cyclic dependancies and
possibly improving startup times - see bottom of this email.)
Below is a minimal set of changes to zope.proxy.__init__ that is required
so that zope.deferredimport can be used.
It does mean you need peak.utils to implement a basic proxy.
from zope.proxy._zope_proxy_proxy import *
from zope.proxy._zope_proxy_proxy import _CAPI
from peak.util.proxies import ObjectProxy
if getProxiedObject(obj1) == getProxiedObject(obj2):
There are a couple of other zope.proxy functions from the 'c' api that I
haven't looked at yet as they aren't used by zope.deferredimport.
Suggestions on improving it and/or followups on the other functions would
also be welcome. I have also found that deferred import can help
with app engine startup times as it means you can import a module you depend
on but not really import the code until it gets touched
which can allow you to stagger you startup costs. (For instance edit
functionality of a site could be deferred until someone
actually edits something).
Hope this helps someone
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -