Proxied old-style classes can't be instantiated
Bug #738216 reported by
Andrew Wilkins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pushy |
Fix Released
|
Medium
|
Andrew Wilkins |
Bug Description
>>> conn = pushy.connect(
>>> conn.execute("""\
... class X:
... def __init__(self):
... print 123
""", locals=locals_)
>>> locals_["X"]()
Traceback (most recent call last):
File "test_local.py", line 14, in <module>
locals_["X"]()
TypeError: 'ObjectProxy' object is not callable
Related branches
Changed in pushy: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.