Message212763
1. I have a tree-like recursive class MyClass. It's method 'get_child(i)' returns an instanse of that same class.
2. I register this class with BaseManager as follows:
class MyManager(BaseManager): pass
MyManager.register('MyClass', MyClass, method_to_typeid={'get_child':'MyClass'})
3. When I call 'get_child' method of AutoProxy[MyClass] object, the exception is raised in the '__init__' method of MyClass: it is called with a single argument which is the instance of MyClass returned by 'get_child'. This happens in the following code of multiprocessing.managers.Server.create method:
373 def create(self, c, typeid, *args, **kwds):
...
382 if callable is None:
383 assert len(args) == 1 and not kwds
384 obj = args[0]
385 else:
386 obj = callable(*args, **kwds) <-This line raises the exception
This means that if ANY method registered with a Manager should return a proxy for a registered typeid, for which a callable is provided, it will fail, unless the callable is capable to handle such unexpected arguments. |
|
Date |
User |
Action |
Args |
2014-03-05 16:03:30 | allista | set | recipients:
+ allista |
2014-03-05 16:03:30 | allista | set | messageid: <1394035410.32.0.813669524051.issue20854@psf.upfronthosting.co.za> |
2014-03-05 16:03:30 | allista | link | issue20854 messages |
2014-03-05 16:03:28 | allista | create | |
|