Re: [Zope-CMF] GenericSetup global registries
On 9 March 2011 14:09, Wichert Akkerman wrote: > On 3/9/11 15:03 , Hanno Schlichting wrote: >> On Wed, Mar 9, 2011 at 3:00 PM, Wichert Akkerman wrote: >>> You really want to use the ZCA for every occurance of a string->object >>> mapping? Really? >> >> As long as Zope doesn't have a central configuration registry like >> Pyramid has, it unfortunately makes sense. It's massive overkill and >> we shouldn't need to force simple values into interfaces, but that's >> the current state of things. > > It worked fine without using the ZCA before, so I don't really see the > problem that we're trying to solve here. It all looks like a workaround > for a missing feature in plone.testing, which won't even help much since > plone.testing needs to support older GS releases as well. I think that may be subjective. It worked fine before because no-one ever put more than one instance of the registry in the same process, and test isolation with ZopeTestCase/PloneTestCase is a joke, so people just accepted leaked state. Global registries maintained in global variables are an anti-pattern, precisely because they always make testing more difficult. We have a standard way to do registries (which may be 'overkill' for this use case in isolation, but not massively so, and as Hanno and Laurence pointed out, consistency of approach matters too). We should use it. plone.testing will evolve, and we'll have a policy whereby major version numbers align with Plone (and thus, indirectly, Zope) versions so as not to have to laden it with the type of BBB spaghetti that made PloneTestCase impossible to maintain. I'm all for cleanup. Next up, get rid of the super-insane global ZCA registry instance variables (yes, plural). But I digress. Martin ___ 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 09/03/11 15:09, Wichert Akkerman a écrit : > It all looks like a workaround > for a missing feature in plone.testing, which won't even help much since > plone.testing needs to support older GS releases as well. > > Wichert. The change I made is internal implementation only. IOW, it can go into a new 1.6.x GenericSetup release... ... which next Plone 4.0.x and 4.1 can both use (AFAIK they use the same version of GenericSetup). This way, plone.testing (which is still not final) can be cleaned up. -- 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 3/9/11 15:03 , Hanno Schlichting wrote: > On Wed, Mar 9, 2011 at 3:00 PM, Wichert Akkerman wrote: >> You really want to use the ZCA for every occurance of a string->object >> mapping? Really? > > As long as Zope doesn't have a central configuration registry like > Pyramid has, it unfortunately makes sense. It's massive overkill and > we shouldn't need to force simple values into interfaces, but that's > the current state of things. It worked fine without using the ZCA before, so I don't really see the problem that we're trying to solve here. It all looks like a workaround for a missing feature in plone.testing, which won't even help much since plone.testing needs to support older GS releases as well. Wichert. ___ 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 Wed, Mar 9, 2011 at 3:00 PM, Wichert Akkerman wrote: > You really want to use the ZCA for every occurance of a string->object > mapping? Really? As long as Zope doesn't have a central configuration registry like Pyramid has, it unfortunately makes sense. It's massive overkill and we shouldn't need to force simple values into interfaces, but that's the current state of things. Hanno ___ 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 3/9/11 14:41 , Laurence Rowe wrote: > On 8 March 2011 16:26, Wichert Akkerman 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. ___ 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 8 March 2011 16:26, Wichert Akkerman 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 ___ 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 Tue Mar 8 12:00:00 2011 UTC to Wed Mar 9 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: Wed Mar 9 01:29:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014488.html Subject: OK : CMF-2.1 Zope-2.11 Python-2.4.6 : Linux From: CMF Tests Date: Wed Mar 9 01:31:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014489.html Subject: OK : CMF-2.2 Zope-2.12 Python-2.6.5 : Linux From: CMF Tests Date: Wed Mar 9 01:33:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014490.html Subject: OK : CMF-2.2 Zope-2.13 Python-2.6.5 : Linux From: CMF Tests Date: Wed Mar 9 01:35:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014491.html Subject: OK : CMF-trunk Zope-2.13 Python-2.6.5 : Linux From: CMF Tests Date: Wed Mar 9 01:37:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014492.html Subject: OK : CMF-trunk Zope-trunk Python-2.6.5 : Linux From: CMF Tests Date: Wed Mar 9 01:39:46 EST 2011 URL: http://mail.zope.org/pipermail/cmf-tests/2011-March/014493.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