New submission from Allis Tauri:
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.
----------
components: Library (Lib)
messages: 212763
nosy: allista
priority: normal
severity: normal
status: open
title: multiprocessing.managers.Server: problem with returning proxy of
registered object
versions: Python 2.7, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20854>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com