-----BEGIN PGP SIGNED MESSAGE-----
Rocky Burt wrote:
> On Sun, 2006-19-11 at 14:37 +0100, Jens Vagelpohl wrote:
>> Using just the ActionsTool right now in order to get that all set up
>> and then move to the other tools, I've gotten almost always there,
>> but there is one set of tests that refuse to run right now, the ones
>> in CMFCore.exportimport.tests.test_actions which derive from class
>> Here's the change I have made in the actions importer code so far:
> <snipping some code...>
>> """Export actions tool.
>> site = context.getSite()
>> - - tool = getToolByName(site, 'portal_actions', None)
>> + tool = getUtility(IActionsTool, context=site)
> This looks like it will be the new way of looking up CMF tools? Looks
For the sake of backward compatibility, I'm thinking we should
re-implement 'getToolByName' to use a map of tool name to interface, and
call 'queryUtility' using that interface; it can then fall back to an
acquired getattr and issue a deprecation warning if that fails (maybe
warn either way?)
> But we shouldn't have to specify ``context=site`` should we?
> getUtility should automatically figure out what the nearest chain of
> sites should be and look for local utilities in each one of them
> automatically no?
That won't work unless the tests set up the thread-local site in the
same way that the publisher does.
Tres Seaver +1 202-558-7113 [EMAIL PROTECTED]
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v126.96.36.199 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests