[Zope-dev] zope.site.hooks

Thomas Lotze tl at gocept.com
Tue Oct 6 10:45:50 EDT 2009


zope.site.hooks is a rather light-weight module that is concerned with
the concept of a current site, where the notion of a site is used in the
same sense as in zope.component, which actually prefers to only talk
about a component registry. In contrast, the rest of zope.site deals with
local site managers and container stuff including the implementation of
folders.

IMO it would be interesting to have the concept of the current site
available separately from the rest of zope.site with its 30 dependencies.
(For example, zope.browserresource demonstrates how with the present
zope.site the need to know the current site in order to determine a URL
leads to a dependency on the ZODB.)

I would propose moving zope.site.hooks to zope.component.hooks if it
wasn't for its use of zope.security in order to remove security proxies in
two places. These places have rather old comments that suggest
reconsidering the handling of security proxies at some point. Right now,
the code that removes the proxies is needed but I'd like to raise the
question whether we should try to get rid of it. If there's no objection
to this goal, I'd like to investigate what it would take.

(Even if zope.site.hooks were to remain a part of zope.site, this would
rid zope.site of the dependency on zope.security and at least one other
package.)

-- 
Thomas





More information about the Zope-Dev mailing list