Re: [Zope-CMF] GenericSetup global registries
On 2011-3-8 17:43, Godefroid Chapelle wrote: > Le 08/03/11 17:26, Wichert Akkerman a écrit : >> 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? > > zope.testing.cleanup functions are all or nothing; there are no ways to > clear a part of what was loaded through ZCML. > plone.testing zca.py uses component registry chaining to enable partial > unload of components registrations. And you could extend it to snapshot GS profiles. Lack of support in plone.testing to do that is not a good reason for complicating GS and making it harder to debug imho. Wichert. -- Wichert AkkermanIt is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] GenericSetup global registries
Le 08/03/11 17:26, Wichert Akkerman a écrit : > 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? zope.testing.cleanup functions are all or nothing; there are no ways to clear a part of what was loaded through ZCML. plone.testing zca.py uses component registry chaining to enable partial unload of components registrations. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] GenericSetup global registries
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. Wichert. -- Wichert AkkermanIt is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] GenericSetup global registries
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. In branch gotcha-registries-use-utilities, I have removed those global storages. The profiles and steps are instead registered as global named utilities. All tests pass. I would appreciate review : http://zope3.pov.lt/trac/changeset?old_path=%2FProducts.GenericSetup%2Fbranches%2Fgotcha-registries-use-utilities&old=120672&new_path=%2FProducts.GenericSetup%2Fbranches%2Fgotcha-registries-use-utilities&new=120738 If I get no comment within 1 week, I'll assume I can merge and will do so. TIA ;-) -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] CMF Tests: 6 OK
Summary of messages to the cmf-tests list. Period Mon Mar 7 12:00:00 2011 UTC to Tue Mar 8 12:00:00 2011 UTC. There were 6 messages: 6 from CMF Tests. Tests passed OK --- Subject: OK : CMF-2.1 Zope-2.10 Python-2.4.6 : Linux From: CMF Tests Date: Tue Mar 8 01:29:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014482.html Subject: OK : CMF-2.1 Zope-2.11 Python-2.4.6 : Linux From: CMF Tests Date: Tue Mar 8 01:31:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014483.html Subject: OK : CMF-2.2 Zope-2.12 Python-2.6.5 : Linux From: CMF Tests Date: Tue Mar 8 01:33:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014484.html Subject: OK : CMF-2.2 Zope-2.13 Python-2.6.5 : Linux From: CMF Tests Date: Tue Mar 8 01:35:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014485.html Subject: OK : CMF-trunk Zope-2.13 Python-2.6.5 : Linux From: CMF Tests Date: Tue Mar 8 01:37:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014486.html Subject: OK : CMF-trunk Zope-trunk Python-2.6.5 : Linux From: CMF Tests Date: Tue Mar 8 01:39:22 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014487.html ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests