Hi folks,

the ZCML directives in zope.component register components using the utility
method handler, which looks like:

    def handler(methodName, *args, **kwargs):
        method = getattr(zope.component.getGlobalSiteManager(), methodName)

In our company-specific framework (which is far far from zope3, and only
uses the bicycle repair kit), we use different registries per application,
similarly to repoze.bfg.

Everything works, included code which relies on the zope.component's API,
thanks to the hooks on getSiteManager. Those ZCML directives use the
getGlobalSiteManager though, which is not hookable and thus we had to
reimplement the ZCML directives we need to call getSiteManager instead of

By default, getSiteManager returns the global registry, so I don't see any
obvious reason why the ZCML directives make use of getGlobalSiteManager.
repoze.bfg, for example, reimplemented the ZCML directives as we did, but
I'd love to be able to use the implementation from zope.component.

Any idea? Would you kill me if I propose to change the registration handler
to use getSiteManager instead? :)

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to