[Zope-dev] zope.component.zcml and global registry

Roger dev at projekt01.ch
Mon Mar 8 11:50:36 EST 2010


Hi Fabio 

> Betreff: Re: [Zope-dev] zope.component.zcml and global registry
> 
> * 2010-03-04 20:51, Fabio Tranchitella wrote:
> > Committed with tests.
> 
> If nobody objects, I would like to release a new (bugfix) 
> release of zope.component with the current trunk. This is the 
> relevant entry from the CHANGES.txt file:

A bugfix probably for your app, but a feature for zope packages

> - The ZCML directives provided by zope.component now register 
> the components in
>   the registry returned by getSiteManager instead of the 
> global registry.
>   This allows the hooking of the getSiteManager method before 
> the load of a
>   ZCML file to register the components in a custom registry.

I've tested our app which uses the local site as application root,
e.g. 

db, connection, root, root_folder = getInformationFromEvent(event)
root_folder = foo.bar.LocalSite()
root[ZopePublication.root_name] = root_folder

It seems that this is fine and the local (root app) site
registry get never touched during configuration setup.

I hope nobody is using setSite in the wrong place,
then this new feature will horribly break their applications.

Regards
Roger Ineichen



More information about the Zope-Dev mailing list