[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 includeOverrides
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:

  adapter zcml:priority=100 ... /

Default priority would be 0, traditional overrides get the maximum
priority. ZTK components might then all be at the default priority,
making it trivial to add a preferred component in a custom setup.

If accompagnied by a sane amount of logging output, this system might
facilitate plugging in components for the rest of us.

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


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 mbo...@gmail.com wrote:
 I always found configuration overrides (e.g. ZCML's includeOverrides
 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:

  adapter zcml:priority=100 ... /

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 levels I think it'd be worse.

 If accompagnied by a sane amount of logging output, this system might
 facilitate plugging in components for the rest of us.

I don't quite follow the for the rest of us part.  Will you expand on
that?
-- 
Benji York
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 63 OK, 9 Failed

2010-12-02 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Wed Dec  1 13:00:00 2010 UTC to Thu Dec  2 13:00:00 2010 UTC.
There were 72 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 19 from 
buildbot at winbot.zope.org, 13 from ccomb at free.fr, 30 from jdriessen at 
thehealthagency.com.


Test failures
-

Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:33:23 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025395.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:35:29 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025397.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:39:10 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025399.html

Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.5 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:45:19 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025403.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:45:25 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025404.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:48:48 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025407.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 14:14:50 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025419.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 14:19:05 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025420.html

Subject: FAILED : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Wed Dec  1 16:03:11 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025426.html


Tests passed OK
---

Subject: OK : Zope Buildbot / zope2.13_win-py2.6 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:10:28 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025391.html

Subject: OK : Zope Buildbot / zope2.13_win-py2.7 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:13:14 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025392.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:27:19 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025393.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:31:37 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025394.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:33:30 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025396.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:37:23 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025398.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:41:54 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025400.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:43:38 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025401.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0_win-py2.6 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:45:07 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025402.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:45:54 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025405.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:47:08 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025406.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:52:30 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025408.html

Subject: OK : Zope Buildbot / zopetoolkit_win-py2.6 slave-win
From: jdriessen at thehealthagency.com
Date: Wed Dec  1 13:52:40 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-December/025409.html

Subject: OK : 

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 be...@benjiyork.com 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 levels I think it'd be worse.

I think there would in general be either no priority set or a single,
non-trivial priority.

It's true that priorities in general open up for some complexity (e.g.
ordering ``zope.viewlet`` viewlets), but if used sparingly, I think
it's a reasonable approach.

 I don't quite follow the for the rest of us part.  Will you expand on
 that?

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 component (should arguably never be the
csae, but it is frequently), it can be difficult to get it right.

Priorities on the other hand are absolute, globally. It's easy for
anyone to see that the highest priority wins, no matter the order of
inclusion.

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


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 component (should arguably never be the
 csae, but it is frequently), it can be difficult to get it right.

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 
configure element? Since you can use this element anywhere and it can be 
nested, it should work well.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. Zope Stephan Richter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 3 porting sprint?

2010-12-02 Thread Lennart Regebro
On Fri, Nov 26, 2010 at 07:26, Ross Patterson m...@rpatterson.net wrote:
 Who would be interested in a sprint, when, where and how?

 I'd be interested in remote sprinting.  I'm available now, FWIW.

OK, so it's me and you then. :-)
Let's talk in January about doing something and staying online at the
same time during some specified period.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


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 srich...@cosmos.phy.tufts.edu 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
 configure element? Since you can use this element anywhere and it can be
 nested, it should work well.

That's reasonable. The priority needs to get applied to the
configuration context anyway and this might (I don't recall the exact
implementation) correspond to the configure element anyway.

I'll try to get an implementation working.

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


Re: [Zope-dev] Zope 3 porting sprint?

2010-12-02 Thread David Glick
On 12/2/10 5:39 AM, Lennart Regebro wrote:
 On Fri, Nov 26, 2010 at 07:26, Ross Patterson m...@rpatterson.net wrote:
 Who would be interested in a sprint, when, where and how?
 I'd be interested in remote sprinting.  I'm available now, FWIW.
 OK, so it's me and you then. :-)
 Let's talk in January about doing something and staying online at the
 same time during some specified period.
I will be at PyCon and would be up for doing some sprinting on it then,
but probably can't commit time otherwise.
--  
David Glick
 Web Developer
 davidgl...@groundwire.org
 206.286.1235x32

Groundwire: You Are Connected   
 http://groundwire.org  

Online tools and strategies for the environmental movement.  Sign up for 
Groundwire News!
 http://groundwire.org/email-capture

Check out our 2010 Website Benchmarks Report. How do you stack up?
 http://groundwire.org/resources/articles/2010-website-benchmarks-report

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


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 mbo...@gmail.com:

 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 component (should arguably never be the
 csae, but it is frequently), it can be difficult to get it right.

 Priorities on the other hand are absolute, globally. It's easy for
 anyone to see that the highest priority wins, no matter the order of
 inclusion.

-1 on priorities - how do you resolve the case where the priorities are  
the same? The proposed solution introduces an additional complexity which  
could get even more baffling than the current one.

I would much prefer a cascading/layered/subclass approach but I suspect  
this might not be possible with the current implementation, so I  
sympathise entirely with your complaint. As a developer you kind of  
imagine that your application layer ought to win just as your subclass  
wins. Can we get some kind of diamond rule?

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


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 mbo...@gmail.com:
 
 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 component (should arguably never be the
 csae, but it is frequently), it can be difficult to get it right.
 
 Priorities on the other hand are absolute, globally. It's easy for
 anyone to see that the highest priority wins, no matter the order of
 inclusion.
 
 -1 on priorities - how do you resolve the case where the priorities are  
 the same? The proposed solution introduces an additional complexity which  
 could get even more baffling than the current one.
 
 I would much prefer a cascading/layered/subclass approach but I suspect  
 this might not be possible with the current implementation, so I  
 sympathise entirely with your complaint. As a developer you kind of  
 imagine that your application layer ought to win just as your subclass  
 wins. Can we get some kind of diamond rule?

I'm -100 on priorities as well.

I'm not quite sure I understand the issue:  the person who should win
is the one configuring the outermost layer (the site, rather than any
soi-disant reusable policy shipped with a library).  No ZCML shipped
as part of a library should *ever* contain an includeOverrides
element, period.  One library writer arrogating the right to override
another library writer's ZCML is insane.

We need to give up on the idea that we can solve the reusable policy
problem with more machinery:  the correct first-order solution is to
create local copies and fix them up by hand (the second-order solution
is to quit shipping so much mandatory ZCML in our packages).


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz4HCUACgkQ+gerLs4ltQ5kGACgrWlvc9XBldb8B//wBn2FMcQC
MIEAoMbraokLM4Dz8wqxumaGJ3kvdypR
=yP08
-END PGP SIGNATURE-

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