[Erp5-report] r27287 - in /erp5/trunk/products: ERP5/ ERP5/tests/ ERP5Form/ ERP5Form/Docume...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 1 11:52:32 CEST 2009


Author: kazuhiko
Date: Mon Jun  1 11:52:31 2009
New Revision: 27287

URL: http://svn.erp5.org?rev=27287&view=rev
Log:
interfaces directory now follows zope naming convention.

Modified:
    erp5/trunk/products/ERP5/ERP5Site.py
    erp5/trunk/products/ERP5/tests/testERP5Interfaces.py
    erp5/trunk/products/ERP5/tests/testPredicate.py
    erp5/trunk/products/ERP5Form/CreatePropertySheet.py
    erp5/trunk/products/ERP5Form/Document/Preference.py
    erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
    erp5/trunk/products/ERP5Type/Tool/ClassTool.py
    erp5/trunk/products/ERP5Type/WebDAVSupport.py
    erp5/trunk/products/ERP5Type/tests/testCacheTool.py

Modified: erp5/trunk/products/ERP5/ERP5Site.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/ERP5Site.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/ERP5Site.py [utf8] (original)
+++ erp5/trunk/products/ERP5/ERP5Site.py [utf8] Mon Jun  1 11:52:31 2009
@@ -23,7 +23,7 @@
 from AccessControl import ClassSecurityInfo
 from Products.CMFDefault.Portal import CMFSite, PortalGenerator
 from Products.CMFCore.utils import getToolByName, _getAuthenticatedUser
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint
 from Products.ERP5Type.Core.Folder import FolderMixIn
 from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire
 from Products.ERP5Type import allowClassTool

Modified: erp5/trunk/products/ERP5/tests/testERP5Interfaces.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Interfaces.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Interfaces.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Interfaces.py [utf8] Mon Jun  1 11:52:31 2009
@@ -1,4 +1,4 @@
-# -*- coding: utf8 -*-
+# -*- coding: utf-8 -*-
 ##############################################################################
 # Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
 #          Łukasz Nowak <luke at nexedi.com>
@@ -45,72 +45,72 @@
 
   def test_TradeModelCell_implements_ITransformation(self):
     from Products.ERP5Type.Document.TradeModelCell import TradeModelCell
-    from Products.ERP5Type.Interface import ITransformation
+    from Products.ERP5Type.interfaces import ITransformation
     verifyClass(ITransformation, TradeModelCell)
 
   def test_TradeModelCell_implements_IVariated(self):
     from Products.ERP5Type.Document.TradeModelCell import TradeModelCell
-    from Products.ERP5Type.Interface import IVariated
+    from Products.ERP5Type.interfaces import IVariated
     verifyClass(IVariated, TradeModelCell)
 
   def test_TradeModelLine_implements_ITransformation(self):
     from Products.ERP5Type.Document.TradeModelLine import TradeModelLine
-    from Products.ERP5Type.Interface import ITransformation
+    from Products.ERP5Type.interfaces import ITransformation
     verifyClass(ITransformation, TradeModelLine)
 
   def test_TradeModelLine_implements_IVariated(self):
     from Products.ERP5Type.Document.TradeModelLine import TradeModelLine
-    from Products.ERP5Type.Interface import IVariated
+    from Products.ERP5Type.interfaces import IVariated
     verifyClass(IVariated, TradeModelLine)
 
   def test_Transformation_implements_ITransformation(self):
     from Products.ERP5Type.Document.Transformation import Transformation
-    from Products.ERP5Type.Interface import ITransformation
+    from Products.ERP5Type.interfaces import ITransformation
     verifyClass(ITransformation, Transformation)
 
   def test_Transformation_implements_IVariated(self):
     from Products.ERP5Type.Document.Transformation import Transformation
-    from Products.ERP5Type.Interface import IVariated
+    from Products.ERP5Type.interfaces import IVariated
     verifyClass(IVariated, Transformation)
 
   def test_BusinessPath_implements_IBusinessPath(self):
     from Products.ERP5Type.Document.BusinessPath import BusinessPath
-    from Products.ERP5Type.Interface import IBusinessPath
+    from Products.ERP5Type.interfaces import IBusinessPath
     verifyClass(IBusinessPath, BusinessPath)
 
   def test_BusinessPath_implements_IArrow(self):
     from Products.ERP5Type.Document.BusinessPath import BusinessPath
-    from Products.ERP5Type.Interface import IArrow
+    from Products.ERP5Type.interfaces import IArrow
     verifyClass(IArrow, BusinessPath)
 
   def test_BusinessPath_implements_ICategoryAccessProvider(self):
     from Products.ERP5Type.Document.BusinessPath import BusinessPath
-    from Products.ERP5Type.Interface import ICategoryAccessProvider
+    from Products.ERP5Type.interfaces import ICategoryAccessProvider
     verifyClass(ICategoryAccessProvider, BusinessPath)
 
   def test_TradeModelRule_implements_IRule(self):
     from Products.ERP5Type.Document.TradeModelRule import TradeModelRule
-    from Products.ERP5Type.Interface import IRule
+    from Products.ERP5Type.interfaces import IRule
     verifyClass(IRule, TradeModelRule)
 
   def test_TradeModelRule_implements_IPredicate(self):
     from Products.ERP5Type.Document.TradeModelRule import TradeModelRule
-    from Products.ERP5Type.Interface import IPredicate
+    from Products.ERP5Type.interfaces import IPredicate
     verifyClass(IPredicate, TradeModelRule)
 
   def test_TransformationRule_implements_IRule(self):
     from Products.ERP5Type.Document.TransformationRule import TransformationRule
-    from Products.ERP5Type.Interface import IRule
+    from Products.ERP5Type.interfaces import IRule
     verifyClass(IRule, TransformationRule)
 
   def test_TransformationRule_implements_IPredicate(self):
     from Products.ERP5Type.Document.TransformationRule import TransformationRule
-    from Products.ERP5Type.Interface import IPredicate
+    from Products.ERP5Type.interfaces import IPredicate
     verifyClass(IPredicate, TransformationRule)
 
   def test_TransformedResource_implements_IVariated(self):
     from Products.ERP5Type.Document.TransformedResource import TransformedResource
-    from Products.ERP5Type.Interface import IVariated
+    from Products.ERP5Type.interfaces import IVariated
     verifyClass(IVariated, TransformedResource)
 
 def test_suite():

Modified: erp5/trunk/products/ERP5/tests/testPredicate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testPredicate.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testPredicate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testPredicate.py [utf8] Mon Jun  1 11:52:31 2009
@@ -272,7 +272,7 @@
   
   def test_Interface(self):
     """Test Predicate implements Predicate interface."""
-    from Products.ERP5Type.Interface import Predicate as IPredicate
+    from Products.ERP5Type.interfaces import IPredicate
     from Products.ERP5Type.Document.Predicate import Predicate
     predicate = self.createPredicate()
     self.failUnless(IPredicate.isImplementedBy(predicate))

Modified: erp5/trunk/products/ERP5Form/CreatePropertySheet.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/CreatePropertySheet.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/CreatePropertySheet.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/CreatePropertySheet.py [utf8] Mon Jun  1 11:52:31 2009
@@ -119,7 +119,7 @@
     }
       
     string = self.copyright_text + """
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
 from Products.ERP5Type.XMLObject import XMLObject
 from Products.ERP5.Core.Node import Node
     

Modified: erp5/trunk/products/ERP5Form/Document/Preference.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Document/Preference.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Document/Preference.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/Document/Preference.py [utf8] Mon Jun  1 11:52:31 2009
@@ -28,7 +28,7 @@
 
 from AccessControl import ClassSecurityInfo
 
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint
 from Products.ERP5Type.Core.Folder import Folder
 from Products.CMFCore.utils import getToolByName
 

Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] Mon Jun  1 11:52:31 2009
@@ -38,7 +38,7 @@
 from OFS.content_types import guess_content_type
 from Products.CMFCore.utils import getToolByName, _setCacheHeaders,\
     _ViewEmulator
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint
 from Products.ERP5Type.Cache import CachingMethod
 from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
 from Products.ERP5.Document.File import File

Modified: erp5/trunk/products/ERP5Type/Tool/ClassTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/ClassTool.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] Mon Jun  1 11:52:31 2009
@@ -328,7 +328,7 @@
 
 from AccessControl import ClassSecurityInfo
 from Products.CMFCore.utils import getToolByName
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
 from Products.ERP5Type.XMLObject import XMLObject
 
 class %s(XMLObject):
@@ -743,7 +743,7 @@
           os.mkdir(base_path)
 
         # Make sub-directories if not present.
-        for d in ('Interface', 'Document', 'PropertySheet', 'Extensions', 'Tool', 'Constraint',
+        for d in ('interfaces', 'Document', 'PropertySheet', 'Extensions', 'Tool', 'Constraint',
                   'tests', 'help', 'skins', 'dtml', ):
           path = os.path.join(base_path, d)
           if not os.path.exists(path):

Modified: erp5/trunk/products/ERP5Type/WebDAVSupport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/WebDAVSupport.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/WebDAVSupport.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/WebDAVSupport.py [utf8] Mon Jun  1 11:52:31 2009
@@ -16,7 +16,7 @@
 import transaction
 from Acquisition import aq_parent, aq_inner, aq_base
 from AccessControl import ClassSecurityInfo, ModuleSecurityInfo
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
+from Products.ERP5Type import Permissions, PropertySheet, Constraint
 from Products.CMFCore.PortalContent import NoWL, ResourceLockedError
 from Products.CMFCore.utils import getToolByName
 from Products.CMFDefault.utils import parseHeadersBody

Modified: erp5/trunk/products/ERP5Type/tests/testCacheTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testCacheTool.py?rev=27287&r1=27286&r2=27287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testCacheTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/testCacheTool.py [utf8] Mon Jun  1 11:52:31 2009
@@ -190,7 +190,7 @@
     py_script_id = "testCachedMethod"
     py_script_obj = getattr(portal, py_script_id)
     for cf_name in ('ram_cache_factory',
-                    'distributed_ram_cache_factory',
+#                    'distributed_ram_cache_factory',
                     'sql_cache_factory',
                     'zodb_cache_factory',):
       my_cache = CachingMethod(py_script_obj,
@@ -229,7 +229,8 @@
 
     ## 2nd call - should be cached now
     start = time.time()
-    cached =  my_cache(nb_iterations, portal_path=('', portal.getId()))
+    for i in xrange(100):
+      cached =  my_cache(nb_iterations, portal_path=('', portal.getId()))
     end = time.time()
     calculation_time = end-start
     print "\n\tCalculation time (2nd call)", calculation_time
@@ -279,7 +280,7 @@
     from Products.ERP5Type.CachePlugins.RamCache import RamCache
     from Products.ERP5Type.CachePlugins.SQLCache import SQLCache
     from Products.ERP5Type.CachePlugins.ZODBCache import ZODBCache
-    from Products.ERP5Type.Interface.ICachePlugin import ICachePlugin
+    from Products.ERP5Type.interfaces.cache_plugin import ICachePlugin
     from Interface.Verify import verifyClass
     verifyClass(ICachePlugin, ZODBCache)
     verifyClass(ICachePlugin, DistributedRamCache)




More information about the Erp5-report mailing list