|
||
|
||
|
||
|
||
|
||
|
||
praiskup commented 4 years ago | ||
praiskup commented 4 years ago Nope, sorry, that's correct. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Applying the 'bind_proxy' decorator in the __init__()
of BaseProxy on
every method of the class was done to save some effort in repeating a
class decorator.
This approach though results in the 'bind_proxy' decorator being applied
every time a proxy object is constructed, which, if enough objects are
constructed, leads to a RecursionError when the stack of 'bind_proxy'
decorators becomes higher than the maximum recursion depth of the Python
interpreter.
Make 'for_all_methods' a class decorator and use it decorate all the
'*Proxy' classes, instead of calling it in BaseProxy.__init__()
.
Fixes: #1499.
Signed-off-by: Hunor Csomortáni csomh@redhat.com
This looks weird. Did you mean
for_all_methods(cls)
?