[Zope-dev] Strange aq_aquire bug

Florent Guillaume fg at nuxeo.com
Fri Mar 25 14:34:23 EST 2005


Zope bug 1730 led me to the strange following behavior of aq_acquire 
with a unicode special name:

 >>> from Acquisition import Implicit, aq_acquire
 >>> class C(Implicit):
...     pass
...
 >>> ob1 = C()
 >>> ob2 = C()
 >>> a = ob1.__of__(ob2)
 >>> getattr(a, u'aq_parent')
<C instance at 40fc1790>
 >>> aq_acquire(a, u'aq_parent')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
AttributeError: aq_parent


Just a note so that you can ensure it's okay in Zope 2.8's Acquisition.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-Dev mailing list