Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-27 Thread Chris Withers

Dieter Maurer wrote:

Chris Withers wrote at 2006-9-25 18:44 +0100:

...
Can we have a papal edict that zcml that has side effects is a bug?
(including the dotted name thing...)


Hm: the purpose of zcml is to have side effects (register things,
patch classes with marker interfaces, add permissions, ...)


Yes, but this shouldn't be done at parse time, only at some later 
realise step once _all_ zcml has been parsed.


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-26 Thread Dieter Maurer
Chris Withers wrote at 2006-9-25 18:44 +0100:
 ...
Can we have a papal edict that zcml that has side effects is a bug?
(including the dotted name thing...)

Hm: the purpose of zcml is to have side effects (register things,
patch classes with marker interfaces, add permissions, ...)



-- 
Dieter
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-26 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
 Chris Withers wrote at 2006-9-25 18:44 +0100:
 ...
 Can we have a papal edict that zcml that has side effects is a bug?
 (including the dotted name thing...)
 
 Hm: the purpose of zcml is to have side effects (register things,
 patch classes with marker interfaces, add permissions, ...)

But not during *parsing* of the ZCML:  parsing is supposed to create a
sequence of actions, which, when executed in sequence, make those changes.

Because we check some kinds of errors too early (during parsing:  in
particular, we check the resolvability of dotted names), we force some
directives to have early effects.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGWuy+gerLs4ltQ4RAjlIAJwK15uUCu6ZRTID+lYnQcsxekQCzQCfbkwI
MukYTI07cG07nUAgdVudcTQ=
=OU26
-END PGP SIGNATURE-
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-26 Thread Jim Fulton


On Sep 26, 2006, at 2:00 PM, Dieter Maurer wrote:


Chris Withers wrote at 2006-9-25 18:44 +0100:

...
Can we have a papal edict that zcml that has side effects is a bug?
(including the dotted name thing...)


Hm: the purpose of zcml is to have side effects (register things,
patch classes with marker interfaces, add permissions, ...)


He means during parsing.  There is some agreement that the work done  
by ZCML should be done during the second stage, after conflicts are  
resolved.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-25 Thread Chris Withers

Jim Fulton wrote:



  It would *also* require that we
implement the no side-effects during parsing policy (my other favorite
dead horse in arguments about ZCML's implementation / usage).


Beat away. :)  I've been in favor of this for some time.  This is 
definitely a goal.


Can we have a papal edict that zcml that has side effects is a bug?
(including the dotted name thing...)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [z3-five] zcml questions

2006-09-25 Thread Chris Withers

Tres Seaver wrote:

How should I do things such that they can do that?

I'm just wondering whether you really need the disabling feature.


I've wanted it.  My major beef with the way we are *using* ZCML now is
that we expect package authors to provide policy-laden configuration for
their packages (sensible defaults) but provide no means for the admin
to reuse that configuration selectively;  their only realy choice is to
*copy* the configuration and edit it.


Yes indeed.


I argued *long* ago (after the first ZC-internal Zope3 sprint, I think)
that the 'include' directive should be allowed to be complex, with
subelements like 'except' or 'only' to pull in specific directives.


This sounds a bit heavyweight, how about just a disable thingy:

disable path=/some/xpath/here/


(e.g., a 'zcml:id' attribute).  It would *also* require that we
implement the no side-effects during parsing policy (my other favorite
dead horse in arguments about ZCML's implementation / usage).


...yep, my disable idea needs this too!

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [z3-five] zcml questions

2006-09-25 Thread Jim Fulton


On Sep 25, 2006, at 1:44 PM, Chris Withers wrote:


Jim Fulton wrote:

  It would *also* require that we
implement the no side-effects during parsing policy (my other  
favorite

dead horse in arguments about ZCML's implementation / usage).
Beat away. :)  I've been in favor of this for some time.  This is  
definitely a goal.


Can we have a papal edict that zcml that has side effects is a bug?
(including the dotted name thing...)


No, but I'm definitely in favor of refactoring existing handlers so  
they do pretty much all of their work in the actions they generate.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [z3-five] zcml questions

2006-09-21 Thread Jim Fulton


On Sep 21, 2006, at 9:15 AM, Tres Seaver wrote:


I've wanted it.  My major beef with the way we are *using* ZCML now is
that we expect package authors to provide policy-laden  
configuration for
their packages (sensible defaults) but provide no means for the  
admin
to reuse that configuration selectively;  their only realy choice  
is to

*copy* the configuration and edit it.


This is mostly true.  I'll note that it is straightforward to  
override things.  It isn't straightforward to disable things,  
especially subscribers.


Anyway, I think you raise a good point.

I argued *long* ago (after the first ZC-internal Zope3 sprint, I  
think)

that the 'include' directive should be allowed to be complex, with
subelements like 'except' or 'only' to pull in specific  
directives.

 Such a practice would require either that we have XPath support
available, or else that we come up with a way to mark the directives
(e.g., a 'zcml:id' attribute).


I don't remember this, but I may have been focussed on other things.  
I definitely think it would be good to have something like this.  It  
would be interesting to see some proposals with examples.



  It would *also* require that we
implement the no side-effects during parsing policy (my other  
favorite

dead horse in arguments about ZCML's implementation / usage).


Beat away. :)  I've been in favor of this for some time.  This is  
definitely a goal.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com