[Zope-CMF] GenericSetup global registries

Wichert Akkerman wichert at wiggy.net
Wed Mar 9 09:00:51 EST 2011


On 3/9/11 14:41 , Laurence Rowe wrote:
> On 8 March 2011 16:26, Wichert Akkerman<wichert at wiggy.net>  wrote:
>> On 2011-3-8 17:08, Godefroid Chapelle wrote:
>>> Hello,
>>>
>>> GenericSetup has global registries for profiles and steps.
>>>
>>> They are a PITA when testing.
>>>
>>> For instance, plone.app.testing has to make a complicated dance to
>>> record and restore their state.
>>
>> How come? There is a very simple cleanup function for them iirc?
>>
>>> In branch gotcha-registries-use-utilities, I have removed those global
>>> storages.
>>>
>>> The profiles and steps are instead registered as global named utilities.
>>
>> I'm not convinced using the ZCA makes sense for this. The steps are a
>> simple list of hooks indexed by name, and the ZCA is massive overkill
>> for that purpose and very painful to introspect.
>
> While the ZCA registry may be overkill for a particular case in
> isolation, when Zope is taken as a whole it is simpler to deal with
> one registry implementation than many differing ones. So +1 for moving
> this to the global ZCA registry.

You really want to use the ZCA for every occurance of a string->object 
mapping? Really?

Wichert.


More information about the Zope-CMF mailing list