pushyrpc / pushy

Easy-as RPC. Zero-server RPC for Python and Java.
http://github.com/pushyrpc/pushy
45 stars 18 forks source link

Proxied old-style classes can't be instantiated #31

Closed axw closed 12 years ago

axw commented 12 years ago

conn = pushy.connect("local:") conn.execute("""\ ... class X: ... def init(self): ... print 123 """, locals=locals) locals["X"]()

Traceback (most recent call last): File "testlocal.py", line 14, in locals["X"]() TypeError: 'ObjectProxy' object is not callable


Imported from Launchpad using lp2gh.

axw commented 12 years ago

(by axwalk) The problem is that old-style class objects don't have a call method, whereas new-style classes do. I have added a new proxy type (oldstyleclass) which adds a call method that calls the remote constructor.