[Zope-CMF] GenericSetup global registries

Laurence Rowe l at lrowe.co.uk
Wed Mar 9 08:41:10 EST 2011


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.

Laurence


More information about the Zope-CMF mailing list