On 20 March 2011 15:29, Jim Fulton <j...@zope.com> wrote:
>> I think you cannot avoid this, if you want to support an explicit
>> configuration phase. Otherwise the first import of a module could
>> occur at any point at runtime and have a configuration side-effect
>> like registering a new view. Personally I find the venusian approach
>> pretty simple and explicit enough.
> I disagree. First, the notion that you'd import at run time is pretty odd,
> unless you count start-up in "runtime".
I think Hanno was saying that configuration at import time is
unpredictable and leads to ordering problems and "circular import"
type risks. This shouldn't really be a surprise to anyone.
> Second, well, really, I'm not ready to give up on a straightforward
> definition of wiring that doesn't rely on module scanning.
I recall Chris suggesting some improvements of the zope.configuration
API to make it user friendly. Right now, it only really makes sense in
the context of writing ZCML directives. Pyramid has largely done that
work, though I'm not sure how "compatible" it is at this point in
With a cleaner, better documented zope.configuration API, you can do
configuration in your "__main__" function or whatever works on
startup. One option then is to use the indirection of ZCML or the
indirection of martian/venusian style scanning, which may make sense
for frameworks and pluggable apps, but less sense for more closed
Then again, it feels like Pyramid has largely done this already. ;-)
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -