Hi!

Jens Vagelpohl wrote:

On Apr 9, 2012, at 23:10 , Charlie Clark wrote:

Am 22.03.2012, 13:28 Uhr, schrieb 
yuppie<y.2012-E2EsyBC0hj3+aS/vkh9...@public.gmane.org>:

The tools are *local* utilities. Including the ZCML doesn't fix this issue. You 
have to run the upgrade step.

Should we add a warning to CMFTools.utils.getToolByName? To use getUtility and 
the interface instead?


Just a general remark: The last time we added a warning to getToolByName it had 
to be taken back out. The protest was too big. No one wanted to spend the time 
on all the third-party packages that still use that API. What's worse, back 
then even the CMF packages were not switched to a pure utility model and would 
emit these warnings as well.

AFAICS the only thing we need to do for backwards compatibility is using registerToolInterface. So it isn't urgent to deprecate and remove getToolByName.

It might be useful to write a howto for people who want to modernize their code.


Cheers,

        Yuppie
_______________________________________________
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

Reply via email to