[CMF-checkins] CVS: CMF/CMFCore - Expression.py:1.7 Skinnable.py:1.12

Yvo Schubbe cvs-admin at zope.org
Mon Dec 1 08:56:13 EST 2003


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv16302/CMFCore

Modified Files:
	Expression.py Skinnable.py 
Log Message:
some code modernization:
- death to string module
- death to apply
- import and whitespace cleanup


=== CMF/CMFCore/Expression.py 1.6 => 1.7 ===
--- CMF/CMFCore/Expression.py:1.6	Thu Nov 27 10:06:49 2003
+++ CMF/CMFCore/Expression.py	Mon Dec  1 08:55:42 2003
@@ -15,16 +15,15 @@
 $Id$
 """
 
-import Globals
-from Globals import Persistent
+from AccessControl import ClassSecurityInfo
 from Acquisition import aq_base, aq_inner, aq_parent
-from AccessControl import getSecurityManager, ClassSecurityInfo
-
-from utils import getToolByName
+from Globals import InitializeClass
+from Globals import Persistent
 from Products.PageTemplates.Expressions import getEngine
-from Products.PageTemplates.TALES import SafeMapping
 from Products.PageTemplates.Expressions import SecureModuleImporter
 
+from utils import getToolByName
+
 
 class Expression (Persistent):
     text = ''
@@ -48,7 +47,7 @@
         #print 'returning %s from %s' % (`res`, self.text)
         return res
 
-Globals.InitializeClass(Expression)
+InitializeClass(Expression)
 
 
 def getExprContext(context, object=None):


=== CMF/CMFCore/Skinnable.py 1.11 => 1.12 ===
--- CMF/CMFCore/Skinnable.py:1.11	Fri Jun 20 11:14:36 2003
+++ CMF/CMFCore/Skinnable.py	Mon Dec  1 08:55:42 2003
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """ Base class for object managers which can be "skinned".
 
@@ -18,11 +18,11 @@
 $Id$
 """
 
-import Globals
-from OFS.ObjectManager import ObjectManager
-from Acquisition import ImplicitAcquisitionWrapper, aq_base, aq_inner
-from ExtensionClass import Base
 from AccessControl import ClassSecurityInfo
+from Acquisition import aq_base
+from Acquisition import ImplicitAcquisitionWrapper
+from Globals import InitializeClass
+from OFS.ObjectManager import ObjectManager
 
 
 # superGetAttr is assigned to whatever ObjectManager.__getattr__
@@ -52,8 +52,8 @@
     def __getattr__(self, name):
         '''
         Looks for the name in an object with wrappers that only reach
-        up to the root skins folder.  
-        
+        up to the root skins folder.
+
         This should be fast, flexible, and predictable.
         '''
         if not name.startswith('_') and not name.startswith('aq_'):
@@ -104,7 +104,7 @@
     security.declarePublic('changeSkin')
     def changeSkin(self, skinname):
         '''Change the current skin.
-        
+
         Can be called manually, allowing the user to change
         skins in the middle of a request.
         '''
@@ -118,7 +118,7 @@
         '''
         Sets up _v_skindata so that __getattr__ can find it.
 
-        Can NOT be called manually to change skins in the middle of a 
+        Can NOT be called manually to change skins in the middle of a
         request! Use changeSkin for that.
         '''
         if REQUEST is None:
@@ -152,9 +152,9 @@
 
     def _checkId(self, id, allow_dup=0):
         '''
-        Override of ObjectManager._checkId().  
-        
-        Allows the user to create objects with IDs that match the ID of 
+        Override of ObjectManager._checkId().
+
+        Allows the user to create objects with IDs that match the ID of
         a skin object.
         '''
         superCheckId = SkinnableObjectManager.inheritedAttribute('_checkId')
@@ -173,4 +173,4 @@
                 self._v_skindata = sd
         return superCheckId(self, id, allow_dup)
 
-Globals.InitializeClass(SkinnableObjectManager)
+InitializeClass(SkinnableObjectManager)




More information about the CMF-checkins mailing list