Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-04 Thread Marius Gedminas
On Sat, Dec 04, 2010 at 12:21:02PM -0800, Ross Patterson wrote: > Malthe Borch writes: > > I always found configuration overrides (e.g. ZCML's > > directive) to be difficult to manage and hard to get right. > > I'd like to echo Malthe's concern here. I've had many issues with this > as well. >

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-04 Thread Hanno Schlichting
On Sat, Dec 4, 2010 at 9:21 PM, Ross Patterson wrote: > Recently I had a conversation with someone or read something about using > add-on specific stacked component registries.  Would this be the best > way to solve these kind of problems?  Unfortunately I can't remember > where I head/read of thi

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-04 Thread Ross Patterson
Malthe Borch writes: > I always found configuration overrides (e.g. ZCML's > directive) to be difficult to manage and hard to get right. > > How about an alternative where you can put a priority on a > configuration context like so: > > > > Default priority would be 0, traditional overrides g

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Charlie Clark
Am 03.12.2010, 11:51 Uhr, schrieb Malthe Borch : > It's not always possible to control the order of execution. For > instance, with z3c.autoinclude, the order of inclusion is somewhat > random and although you can to some extend control the order via > explicit dependency includes, it's hard to wo

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Chris Withers
On 03/12/2010 10:51, Malthe Borch wrote: > On 3 December 2010 11:41, Chris Withers wrote: >> I'd much prefer it to just be an "order of execution" thing, the nyou have >> total and flexible control. Combined with some logging about why something >> is as it is and you have your solution. > > It's

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Malthe Borch
On 3 December 2010 11:41, Chris Withers wrote: > I'd much prefer it to just be an "order of execution" thing, the nyou have > total and flexible control. Combined with some logging about why something > is as it is and you have your solution. It's not always possible to control the order of execu

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Marius Gedminas
On Thu, Dec 02, 2010 at 09:15:44AM +0100, Malthe Borch wrote: > I always found configuration overrides (e.g. ZCML's > directive) to be difficult to manage and hard to get right. > > How about an alternative where you can put a priority on a > configuration context like so: > > -1 Adding mor

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-03 Thread Chris Withers
On 02/12/2010 08:15, Malthe Borch wrote: > I always found configuration overrides (e.g. ZCML's > directive) to be difficult to manage and hard to get right. > > How about an alternative where you can put a priority on a > configuration context like so: > > I'm -sys.maxint on priorities. > Def

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/2010 03:43 PM, Charlie Clark wrote: > Am 02.12.2010, 14:19 Uhr, schrieb Malthe Borch : > >> As far as I understand, for a ZCML include override to work properly, >> you need to carefully make sure that your includes are in the exact >> right

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Charlie Clark
Am 02.12.2010, 14:19 Uhr, schrieb Malthe Borch : > As far as I understand, for a ZCML include override to work properly, > you need to carefully make sure that your includes are in the exact > right order and on the same level. In a system where two packages are > trying to override the same compo

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Malthe Borch
On 2 December 2010 14:37, Stephan Richter wrote: > This explanation helped me to understand where you come from. I think I would > be okay with the priority feature, but could we maybe limit it to the > element? Since you can use this element anywhere and it can be > nested, it should work well.

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Stephan Richter
On Thursday, December 02, 2010, Malthe Borch wrote: > As far as I understand, for a ZCML include override to work properly, > you need to carefully make sure that your includes are in the exact > right order and on the same level. In a system where two packages are > trying to override the same com

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Malthe Borch
On 2 December 2010 13:34, Benji York wrote: > I appreciate the flexibility inherent in that approach, but personally, > I'd be frightened of such a system.  I sometimes have problems figuring > out which directives are active in the current system, if I had to > reason about dozens of priority lev

Re: [Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Benji York
On Thu, Dec 2, 2010 at 3:15 AM, Malthe Borch wrote: > I always found configuration overrides (e.g. ZCML's > directive) to be difficult to manage and hard to get right. > > How about an alternative where you can put a priority on a > configuration context like so: > >   I appreciate the flexibili

[Zope-dev] Context priority as an alternative to configuration directive overrides

2010-12-02 Thread Malthe Borch
I always found configuration overrides (e.g. ZCML's directive) to be difficult to manage and hard to get right. How about an alternative where you can put a priority on a configuration context like so: Default priority would be 0, traditional overrides get the maximum priority. ZTK component