[CMF-checkins] CVS: CMF/CMFCore - utils.py:1.50
Yvo Schubbe
y.2004_ at wcm-solutions.de
Mon Mar 8 13:53:59 EST 2004
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv20319/CMFCore
Modified Files:
utils.py
Log Message:
- added deprecation warning in _getViewFor; this covers __call__ and view methods as well
- marked also the helper method _verifyActionPermissions as deprecated
=== CMF/CMFCore/utils.py 1.49 => 1.50 ===
--- CMF/CMFCore/utils.py:1.49 Thu Feb 12 03:37:32 2004
+++ CMF/CMFCore/utils.py Mon Mar 8 13:53:58 2004
@@ -19,6 +19,7 @@
from os import path as os_path
import re
from types import StringType, UnicodeType
+from warnings import warn
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
@@ -143,6 +144,8 @@
security.declarePrivate('_verifyActionPermissions')
def _verifyActionPermissions(obj, action):
+ # _verifyActionPermissions is deprecated and will be removed in CMF 1.6.
+ # This was only used by the deprecated _getViewFor function.
pp = action.getPermissions()
if not pp:
return 1
@@ -168,6 +171,11 @@
security.declarePrivate('_getViewFor')
def _getViewFor(obj, view='view'):
+ warn('__call__() and view() methods using _getViewFor() as well as '
+ '_getViewFor() itself are deprecated and will be removed in CMF 1.6. '
+ 'Bypass these methods by defining \'(Default)\' and \'view\' Method '
+ 'Aliases.',
+ DeprecationWarning)
ti = obj.getTypeInfo()
if ti is not None:
More information about the CMF-checkins
mailing list