Hi,

while trying to isolate a bug in my app, I found some strange
differences between the implementations of remote_* and perspective_*.

1. in pb.Broker.serialize(), those attributes are set and restored:
   jellyMethod, jellyArgs, jellyKw. Within twisted
   Those attributes are not used anywhere. I grepped, and I ran the
   test suite without those. Is there some code outside of twisted
   using this? What for? Or is there a need for avoiding garbage
   collection? (which would need some explanation).

   My theory is that it was forgotten to remove them when doing
   svn commit 1448: Before, they were actually used in 
   _NetJellier._jelly_instance, but no more after this commit.


2. Those implementations differ:
        remote_*: return broker.serialize(state, self.perspective)
        perspective_*: return broker.serialize(state, self, method, args, kw)
        view_*: return broker.serialize(state, self.perspective, method, args, 
kw)
        observe_*: return broker.serialize(state, None, method, args, kw)

   Can you please explain why remote_* is implemented differently?
   This goes back to before the first import to svn, so I cannot 
   browse the history.


3. They all raise AttributeError for undefined method except remote_*
   which raises MethodNotFound. Both are not documented in the API.
   Could this be unified to MethodNotFound?

   My theory is that svn commit 13473 was incomplete. Commit message was:

        Raise NoSuchMethod instead of AttributeError when call is made to 
remote_
        method that doesn't exist


-- 
Wolfgang

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to