yuppie wrote:

Well. The 2.1 changes are based one the assumption that we switch quickly and completely to utilities, making all tools work as utilities. The roadmap proposed by Tres means it will take several years and we'll have to work with tools and utilities side by side for a long time.

I can live with that approach, but would like to see CMF 2.1 adjusted:

'getToolByInterfaceName' is a completely misleading method name if tools will not become utilities. This method has no 'context' (or 'REQUEST') argument, so it can't return tools. It returns utilities. 'getUtilityByInterfaceName' would be a much better name for a 'getUtility' replacement used in untrusted code.

I propose to run a search 'n' replace *before* the next beta.

I'm getting a bit lost in all the jumps back and forth now, but can I please ask (beg?) that the following stays true for CMF 2.1 at the very least:

 - getToolByName works as before, on all standard tools
 - getToolByName never spits deprecation warnings

I support a move to utilities and views (if they are true utilities and views, not just for the sake of "more Zope3ish syntax") in principle, but I've already converted a whole bunch of code to use getUtility and then had to convert it back to getToolByName.

I'm also in the position of writing documentation and issuing guidelines. A rule that says "X and Y are acquired using getToolByName, A, B and C you have to use getUtility" is just too arbitrary and confusing for most people.


Acquisition is a jealous mistress

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to