The pure Python version implements the _Wrapper special methods wrongly:
consider the following case:
from Acquisition import Implicit
class I(Implicit):
def add(self, id):
o = I(); o.id = id
setattr(self, id, o)
return getattr(self, id)
top = I()
f = top.add("f")
f2 = f.f
Calling bool(f2) causes an infinite loop:
>>> bool(f2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dieter/tmp/ec/Acquisition/src/Acquisition/__init__.py", line 545, in __nonzero__
return bool(nonzero(self)) # Py3 is strict about the return type
File "/home/dieter/tmp/ec/Acquisition/src/Acquisition/__init__.py", line 545, in __nonzero__
return bool(nonzero(self)) # Py3 is strict about the return type
File "/home/dieter/tmp/ec/Acquisition/src/Acquisition/__init__.py", line 545, in __nonzero__
return bool(nonzero(self)) # Py3 is strict about the return type
[Previous line repeated 988 more times]
File "/home/dieter/tmp/ec/Acquisition/src/Acquisition/__init__.py", line 535, in __nonzero__
aq_self = self._obj
File "/home/dieter/tmp/ec/Acquisition/src/Acquisition/__init__.py", line 412, in __getattribute__
return _OGA(self, name)
RecursionError: maximum recursion depth exceeded while calling a Python object
The pure Python version implements the
_Wrapper
special methods wrongly: consider the following case:Calling
bool(f2)
causes an infinite loop: