[Grok-dev] grok mini-sprint progress

Sylvain Viollon sylvain at infrae.com
Fri Jan 22 06:12:23 EST 2010


On Thursday 21 January 2010 14:22:57 Hanno Schlichting wrote:
> On Thu, Jan 21, 2010 at 1:01 PM, Martijn Faassen <faassen at startifact.com> 
> > zope.app.zcmlfiles
> >
> > We need to cut the dependency on zope.app.zcmlfiles in all packages. We
> > experimentally tried this in grokcore.view. It turns out that if we
> > include enough package's ZCML by hand, it works. It's a long list of
> > includes, however.
> The couple of times I did this in Zope packages, I came up with long
> list each time as well. Unfortunately those lists where never quite
> exactly the same. In principle these dependencies should more or less
> reflect the package dependencies and the "ZCML dependency tree" should
> be very similar to the "package dependency tree". It should be
> possible to distribute those testing dependency declarations
> throughout the tree, much like the ftesting.zcml approach worked.

   As matter of fact, that list of includes is almost always the list of 
includes that should be in the configure.zcml of the tested package itself. If 
the package needs adapters from zope.traversing for instance, it should 
include zope.traversing itself in configure.zcml. It's never the case and it 
just work because hopefully somewhere someone included it, or included 
zope.app.zcmlfiles which include everything (which is bad).

   For instance if you look at zope.app.appsetup, the configure.zcml doesn't 
include any other zcml at all. It's a bit difficult to understand that.

   Please include your dependencies correctly in configure.zcml !

   The only include in a ftesting.zcml that should be need would to include 
the configure.zcml of the same package. And the ftesting.zcml could contain in 
addition some security setup declaration (like declaring principals, 
permission mapping ...) to make the test code happy and work like if it had 
real security declaration from the main configuration.



Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands

More information about the Grok-dev mailing list