[Zope-CMF] Re: CVS: CMF/CMFCore - ActionsTool.py:1.45
Tres Seaver
tseaver at zope.com
Wed Feb 4 11:32:51 EST 2004
Yvo Schubbe "wrote":
> 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
<snip>
> @@ -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.
I think there is a real use case for honoring object actions (Casey has
a couple of folders-with-actions in Z4I which are "singletons", for
instance). Perhaps we should deprecate only the bare check for
'listActions', but promise to honor the object's own interfaces: if it
implements IActionProvider, then we will call it without warning.
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list