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

2010-03-15 Thread Chris McDonough
On 3/15/10 11:52 AM, Fabio Tranchitella wrote: > * 2010-03-08 18:16, Fabio Tranchitella wrote: >> I'll wait till the week-end to release it, so everybody has the opportunity >> to have a word on this topic. > > I've released zope.component 3.9.3 with the change I discussed on the list > in the last

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

2010-03-15 Thread Fabio Tranchitella
* 2010-03-08 18:16, Fabio Tranchitella wrote: > I'll wait till the week-end to release it, so everybody has the opportunity > to have a word on this topic. I've released zope.component 3.9.3 with the change I discussed on the list in the last couple of weeks (ZCML registrations using getSiteManage

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

2010-03-08 Thread Roger
Hi Hanno > Betreff: Re: [Zope-dev] zope.component.zcml and global registry > > On Mon, Mar 8, 2010 at 7:23 PM, Roger wrote: > > Another point, reloading ZCML actions after a system > startup e.g. from > > the UI is probably not possible anymore. Then we whould >

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

2010-03-08 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roger wrote: > Hi Tres > >> Betreff: Re: [Zope-dev] zope.component.zcml and global registry >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Baiju M wrote: >>> On Mon, Mar 8, 2010 at 9:1

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

2010-03-08 Thread Hanno Schlichting
On Mon, Mar 8, 2010 at 7:23 PM, Roger wrote: > Another point, reloading ZCML actions after a system startup > e.g. from the UI is probably not possible anymore. Then we whould > have to call setSite(None) and this, on a running system, whould > force to loose the local components registry at the s

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

2010-03-08 Thread Roger
Hi Tres > Betreff: Re: [Zope-dev] zope.component.zcml and global registry > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Baiju M wrote: > > On Mon, Mar 8, 2010 at 9:18 PM, Fabio Tranchitella > wrote: > >> * 2010-03-04 20:51, Fabio Tranchitel

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

2010-03-08 Thread Fabio Tranchitella
* 2010-03-08 17:51, Roger wrote: > A bugfix probably for your app, but a feature for zope packages I thought it is a bug fix (I see no reason why it used the global registry before, because it is totally equivalent) and it does not change the API and the semantic of the ZCML directives. I don't m

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

2010-03-08 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Baiju M wrote: > On Mon, Mar 8, 2010 at 9:18 PM, Fabio Tranchitella wrote: >> * 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 cu

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

2010-03-08 Thread Roger
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.

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

2010-03-08 Thread Baiju M
On Mon, Mar 8, 2010 at 9:18 PM, Fabio Tranchitella wrote: > * 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 fil

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

2010-03-08 Thread Fabio Tranchitella
* 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: - The ZCML directives provided by zope.component now register the

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

2010-03-04 Thread Fabio Tranchitella
* 2010-03-03 21:35, Tres Seaver wrote: > If the tests all pass, then I would say go ahead and commit it now, but > add tests to verify that the new feature works as you expect. Committed with tests. Best regards, Fabio ___ Zope-Dev maillist - Zope-Dev

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

2010-03-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fabio Tranchitella wrote: > * 2010-03-03 14:57, Roger wrote: >> If all kind of configuration directive processing is done before any kind >> of DB root access and relevant event handling (e.g. site hook setup) this >> seems fine to me. If not, then we

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

2010-03-03 Thread Fabio Tranchitella
* 2010-03-03 14:57, Roger wrote: > If all kind of configuration directive processing is done before any kind > of DB root access and relevant event handling (e.g. site hook setup) this > seems fine to me. If not, then we run into troubles with the changes. I've tried the patch running the whole zt

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

2010-03-03 Thread Stephan Richter
On Wednesday 03 March 2010, Fabio Tranchitella wrote: > Thanks for the link; z3c.baseregistry depends on zope.site, which depends > on a lot of packages we don't use, though. I think you can make it easily zope.site independent. > Also, I think my use case it quite different, because we don't use

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

2010-03-03 Thread Fabio Tranchitella
* 2010-03-03 15:33, Stephan Richter wrote: > Mmh, I implemented z3c.baseregistry a long time ago, which allows you to > register components into arbitrary registries. > > http://svn.zope.org/z3c.baseregistry/trunk/src/z3c/baseregistry/README.txt?rev=107147&view=auto Thanks for the link; z3c.baser

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

2010-03-03 Thread Stephan Richter
On Wednesday 03 March 2010, Fabio Tranchitella wrote: > Any idea? Would you kill me if I propose to change the registration handler > to use getSiteManager instead? :) Mmh, I implemented z3c.baseregistry a long time ago, which allows you to register components into arbitrary registries. http://s

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

2010-03-03 Thread Roger
Hi Hanno > Betreff: Re: [Zope-dev] zope.component.zcml and global registry > > On Wed, Mar 3, 2010 at 11:12 AM, Roger wrote: > > I like to use getGlobalSiteManager by default because this doesn't > > force a database access and load the local site manager if >

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

2010-03-03 Thread Hanno Schlichting
On Wed, Mar 3, 2010 at 11:12 AM, Roger wrote: > I like to use getGlobalSiteManager by default because this > doesn't force a database access and load the local site > manager if the site is a local site. The database access only happens if a local site is set into the corresponding thread local.

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

2010-03-03 Thread Roger
Hi Fabio > Betreff: Re: [Zope-dev] zope.component.zcml and global registry > > Hello roger, > > * 2010-03-03 11:36, Roger wrote: > > Not sure if I understand you correct. But what do you think > about the > > following: > > > > - implement a new opt

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

2010-03-03 Thread Fabio Tranchitella
Hello roger, * 2010-03-03 11:36, Roger wrote: > Not sure if I understand you correct. But what do you think > about the following: > > - implement a new optional attribute useLocal=True > in the directive and then configure the directive action > and make use of the (local) getSiteManager me

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

2010-03-03 Thread Roger
Hi Fabio > Betreff: [Zope-dev] zope.component.zcml and global registry > > Hi folks, > > the ZCML directives in zope.component register components > using the utility method handler, which looks like: > > def handler(methodName, *args, **kwargs): >

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

2010-03-03 Thread Fabio Tranchitella
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 fr