[z3-five] Five release fest: 1.2.4, 1.3.5, 1.4c and 1.5b released!

Alec Mitchell apm13 at columbia.edu
Fri May 5 16:35:44 CEST 2006


The new releases of Five should all check aq_base, not the objects
themselves.  It actually uses obj.aq_base, instead of aq_base(obj)
because the two differ in some cases and there seem to be cases where
'aq_base(context) != aq_base(adapted)' even though 'context.aq_base ==
adapted.aq_base'.  Frightening stuff really.

Alec

On 5/4/06, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> Hi Nikolay,
> > it happens when browser:editform is used with "for" and "schema"
> > attributes and object support schema with adapter.
> >
> > Index: form/__init__.py
> > ===================================================================
> > --- form/__init__.py    (revision 67959)
> > +++ form/__init__.py    (working copy)
> > @@ -19,6 +19,7 @@
> >  from datetime import datetime
> >
> >  import Acquisition
> > +from Acquisition import aq_base
> >  import transaction
> >  from zope.event import notify
> >  from zope.schema.interfaces import ValidationError
> > @@ -63,7 +64,7 @@
> >
> >      def _setUpWidgets(self):
> >          adapted = self.schema(self.context)
> > -        if adapted is not self.context:
> > +        if aq_base(adapted) is not aq_base(self.context):
> >              if not ILocation.providedBy(adapted):
> >                  adapted = LocationProxy(adapted)
> >              adapted.__parent__ = self.context
> >
> >
>
> Thanks for the patch. Can you please also create a test that exercises
> this code and include it in the patch?
>
> Thank you
>
> Philipp
> _______________________________________________
> z3-five mailing list
> z3-five at codespeak.net
> http://codespeak.net/mailman/listinfo/z3-five
>


More information about the z3-five mailing list