[Zope-Coders] bug in ZPublisher.BaseRequest

Casey Duncan casey@zope.com
Wed, 25 Sep 2002 09:50:44 -0400


I know how to "fix" this, but I'm not sure manage_property_types should e=
ven=20
be there. It obviously doesn't work. How would one access it? I thought i=
t=20
would be globally acquireable, but it is not.

Even more perplexing is the except clause which does not define the metho=
d at=20
all presumably if the ExtensionClass import fails. I can't imagine why we=
=20
would want to fail gracefully here like this. If ExtensionClass doesn't=20
import, we're hosed anyway, right? (This is a bare except tho, so who kno=
ws=20
what exception we are expecting).

Also, Zope/__init__.py defines another RequestContainer which is used by =
the=20
zpublisher_exception_hook function there.

Anybody have any insights on how this should be "fixed"?

-Casey

On Tuesday 24 September 2002 06:10 pm, Jeremy Hylton wrote:
> Here's another bug Neal reported that I don't know how to fix.  In
> BaseRequest, there's a method that refers to the global variable
> type_converters.  This variable doesn't exist -- didn't even exist in
> revision 1.1.  What's supposed to happen?
>=20
> Jeremy
>=20
> try:
>     from ExtensionClass import Base
>     class RequestContainer(Base):
>         __roles__=3DNone
>         def __init__(self,**kw):
>             for k,v in kw.items(): self.__dict__[k]=3Dv
>=20
>         def manage_property_types(self):
>             return type_converters.keys()
>=20
> except:
>     class RequestContainer:
>         __roles__=3DNone
>         def __init__(self,**kw):
>             for k,v in kw.items(): self.__dict__[k]=3Dv
>=20
>=20
> _______________________________________________
> Zope-Coders mailing list
> Zope-Coders@zope.org
> http://lists.zope.org/mailman/listinfo/zope-coders
>=20