[Zope-dev] Re: [Warning] Zope 3 component architecture (CA) not reliably usable for registrations from Python

Philipp von Weitershausen philipp at weitershausen.de
Thu Jan 11 10:28:12 EST 2007


Chris Withers wrote:
> Stephan Richter wrote:
>> If you are populating the CA before ZCML is fully parsed, then:
> 
> Why is the CA predicated on ZCML?!

It's not. And Stephan's "Collect all registrations before executing 
them!" isn't actually necessary either (it's just necessary for conflict 
resolution; grok doesn't do it, for example). The only problem lies with 
registrations upon import:

* You can't import the module/package w/o having the registration to 
take place (so you can't subclass the components and have those 
registered instead of the orginial ones, for example)

* Import happens once, so when you have unit tests that set up and clear 
the Component Architecture properly, you will loose all of those 
registrations that happened on import pretty fast.


-- 
http://worldcookery.com -- Professional Zope documentation and training
2nd edition of Web Component Development with Zope 3 is now shipping!


More information about the Zope-Dev mailing list