[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.45
Yvo Schubbe
y.2004_ at wcm-solutions.de
Wed Feb 4 06:57:16 EST 2004
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv2516/CMFCore
Modified Files:
ActionsTool.py
Log Message:
- added deprecation warnings
=== CMF/CMFCore/ActionsTool.py 1.44 => 1.45 ===
--- CMF/CMFCore/ActionsTool.py:1.44 Fri Nov 28 09:52:00 2003
+++ CMF/CMFCore/ActionsTool.py Wed Feb 4 06:56:45 2004
@@ -16,6 +16,7 @@
"""
from types import DictionaryType
+from warnings import warn
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
@@ -168,6 +169,10 @@
actions.extend( provider.listActionInfos(object=object) )
else:
# for Action Providers written for CMF versions before 1.5
+ warn('ActionProvider interface not up to date. In CMF 1.6 '
+ 'portal_actions will ignore listActions() of \'%s\'.'
+ % provider_name,
+ DeprecationWarning)
actions.extend( self._listActionInfos(provider, object) )
# for objects written for CMF versions before 1.5
@@ -175,6 +180,11 @@
if object is not None:
base = aq_base(object)
if hasattr(base, 'listActions'):
+ warn('Providing Actions by the object itself is deprecated. '
+ 'In CMF 1.6 portal_actions will ignore listActions() of '
+ '\'%s\' if it is not registered as action provider.'
+ % object.getId(),
+ DeprecationWarning)
actions.extend( self._listActionInfos(object, object) )
# Reorganize the actions by category.
More information about the CMF-checkins
mailing list