[ZPatterns] bug using ZedPatterns with Zope 2.5

Steve Spicklemire steve@spvi.com
Thu, 29 Nov 2001 06:13:28 -0500


Hi Steve,

	Will this fix also work on Zope 2.4.x? It looks safe enough... 
since presumably in 2.4 "validate" is always called with an 'md' else 
the bug would've surfaced earlier.. right?

thanks,
-steve

On Thursday, November 29, 2001, at 05:50 AM, Steve Alexander wrote:

> Hi Folks,
>
> There's a bug with using ZedPatterns with Zope 2.5.
>
> The fix is simple. Apply this patch to ZPatterns/Expressions.py.
>
>
>
> *** Expressions.py.original
> --- Expressions.py
> ***************
> *** 50,56 ****
>         stack._push(InstanceDict(object,stack))"""
>
>       # Called by Zope only
> !     def validate(self, inst, parent, name, value, md):
>           return getSecurityManager().validate(inst, parent, name, 
> value)
>
>
> --- 50,56 ----
>         stack._push(InstanceDict(object,stack))"""
>
>       # Called by Zope only
> !     def validate(self, inst, parent, name, value, md=None):
>           return getSecurityManager().validate(inst, parent, name, 
> value)
>
>
> The annoying thing is that I fixed this bug in the Zope core for Zope 
> 2.5a1. I didn't think to check ZPatterns for the same bug! Doh!
>
>
>
> --
> Steve Alexander
> Software Engineer
> Cat-Box limited
>
>
> _______________________________________________
> ZPatterns mailing list
> ZPatterns@eby-sarna.com
> http://www.eby-sarna.com/mailman/listinfo/zpatterns