[Zope] Z SQL Methods appear broken in 2.4.x

Thomas B. Passin tpassin@mitretek.org
Fri, 28 Sep 2001 18:28:10 -0400


[Joseph J Wolff]

> It appears that Z SQL Methods are broken in 2.4.x.
>
> Specifically, the type=string in a <dtml-sqlvar> is broken -
>
> a simple ZSQL query such as:
>
> select id, cost, name
> from choices
> where name = <dtml-sqlvar nam type=string>
>
> results in the following error:
>
> exceptions.NameError: global name 'string' is not defined
>
> It's broken on 2.4.0 and 2.4.1, and works fine on 2.2.5, 2.3.0, and
2.3.2 -
> in fact, it's in production on our 2.2.5.
>
> Integer parameters work fine.
>
> It's hard to believe that no one else has run into this, and that the
stable
> 2.4.x branch has gotten this far without anyone noticing this - I've even
> tried it on 2 different servers running Zope 2.4 (2.4.1 on FreeBSD 4.0,
our
> production web server, and 2.4.0 on FreeBSD 4.3, our dev server)
>

I seem to remember a recent thread on this, ending with a minor patch to
import the string module.  Do a search on the archives.  This is best done
on the Active State archives at

http://aspn.activestate.com/ASPN/Mail/

Cheers,

Tom P