[Zope-CMF] [dev] tools as utilities

Hanno Schlichting hanno at hannosch.eu
Mon Sep 12 07:44:54 EST 2011

On Mon, Sep 12, 2011 at 12:32 PM, yuppie <y.2011 at wcm-solutions.de> wrote:
> Jens Vagelpohl wrote:
>> On Sep 12, 2011, at 11:52 , yuppie wrote:
>>> I propose to use 'five.globalrequest' instead of self.REQUEST inside
>>> tools. AFAICS that allows to convert *all* tools into utilities.


>> Why would you want to add a dependency for 3 lines of code? All that package does is register a 1 line event handler. I'd rather do that in the CMF itself.
> Because it provides an API that is also used and maintained by other
> people. Plone 4.1 depends on it.

I think we should just merge five.globalrequest into Zope2 itself.
zope.globalrequest can stay on its own. This would be for Zope 4, in
Zope 2.13 you would use the extra five.globalrequest package to enable

>> IMHO the "cleaner" way would be to make sure the request object is explicitly passed into any code that needs it.
> Sure. But that requires either API changes in the tools or new view
> code. The last 4 years nobody did work on this because it is much more
> work than 'just' converting tools to utilities.

Yep. I think changing the actual API's of all of these tools for the
sake of better separation of concerns is not worth it anymore. We
won't turn them into nice and pretty API's anyways as there's too few
people working on this. So using the globalrequest "trick" sounds like
the best approach to me.


More information about the Zope-CMF mailing list