Example #1
0
 def unjellyFor(self, unjellier, jellyList):
     if unjellier.invoker is None:
         return setInstanceState(self, unjellier, jellyList)
     self.broker = unjellier.invoker
     self.luid = jellyList[1]
     cProxy = _newDummyLike(self)
     # XXX questionable whether this was a good design idea...
     init = getattr(cProxy, "__init__", None)
     if init:
         init()
     unjellier.invoker.cacheLocally(jellyList[1], self)
     cProxy.setCopyableState(unjellier.unjelly(jellyList[2]))
     # Might have changed due to setCopyableState method; we'll assume that
     # it's bad form to do so afterwards.
     self.__dict__ = cProxy.__dict__
     # chomp, chomp -- some existing code uses "self.__dict__ =", some uses
     # "__dict__.update".  This is here in order to handle both cases.
     self.broker = unjellier.invoker
     self.luid = jellyList[1]
     return cProxy
Example #2
0
 def unjellyFor(self, unjellier, jellyList):
     if unjellier.invoker is None:
         return setInstanceState(self, unjellier, jellyList)
     self.broker = unjellier.invoker
     self.luid = jellyList[1]
     cProxy = _newDummyLike(self)
     # XXX questionable whether this was a good design idea...
     init = getattr(cProxy, "__init__", None)
     if init:
         init()
     unjellier.invoker.cacheLocally(jellyList[1], self)
     cProxy.setCopyableState(unjellier.unjelly(jellyList[2]))
     # Might have changed due to setCopyableState method; we'll assume that
     # it's bad form to do so afterwards.
     self.__dict__ = cProxy.__dict__
     # chomp, chomp -- some existing code uses "self.__dict__ =", some uses
     # "__dict__.update".  This is here in order to handle both cases.
     self.broker = unjellier.invoker
     self.luid = jellyList[1]
     return cProxy
Example #3
0
def unjellyCached(unjellier, unjellyList):
    luid = unjellyList[1]
    cNotProxy = unjellier.invoker.cachedLocallyAs(luid)
    cProxy = _newDummyLike(cNotProxy)
    return cProxy
Example #4
0
def unjellyCached(unjellier, unjellyList):
    luid = unjellyList[1]
    cNotProxy = unjellier.invoker.cachedLocallyAs(luid)
    cProxy = _newDummyLike(cNotProxy)
    return cProxy