[Zope-CMF] Re: ToolInit deprecation warnings

Martin Aspeli optilude at gmx.net
Sat Jul 23 15:59:04 EDT 2005


Note that Plone does this all over the place, and we probably won't change  
it for 2.1. 2.1.1 maybe...

Martin

> Hi Jens.  It clearly says 'parameter' as you have pointed out.  Must be  
> tired, sorry.  I'll look for these products and make the changes. Many  
> thanks.
>
> Regards,
> David
>
> On Saturday, July 23, 2005, at 02:43 PM, Jens Vagelpohl wrote:
>
>>
>> On 23 Jul 2005, at 18:21, David Pratt wrote:
>>> /usr/local/zope/instance1/Products/CMFCore/utils.py:427:  
>>> DeprecationWarning: The product_name parameter of ToolInit is  
>>> deprecated and will be ignored in CMF1.6: kupu
>>>   DeprecationWarning)
>>>
>>> I checked with CMFDefault to see it there was a different class to use  
>>> but it is as follows:
>>>
>>> from Products.CMFCore.utils import ToolInit
>>>
>>>     ToolInit( 'CMF Default Tool'
>>>             , tools=tools
>>>             , icon='tool.gif'
>>>             ).initialize( context )
>>>
>>> What should I be using instead of ToolInit so that code is more  
>>> futureproof and to avoid the deprecation warnings.
>>
>> Please read the warning more carefully, it spells out very clearly what  
>> the problem is. It's not ToolInit that's deprecated, but passing an  
>> argument named "product_name" to it. One of your products does. Find it  
>> andd eliminate the extra argument.
>>
>> jens
>>
>> _______________________________________________
>> Zope-CMF maillist  -  Zope-CMF at lists.zope.org
>> http://mail.zope.org/mailman/listinfo/zope-cmf
>>
>> See http://collector.zope.org/CMF for bug reports and feature requests
>>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>



-- 
(muted)



More information about the Zope-CMF mailing list