[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2/setup - dbtab.py:1.4 patches.py:1.3

Shane Hathaway shane at zope.com
Sat Mar 20 01:34:27 EST 2004


Update of /cvs-repository/Products/Ape/lib/apelib/zope2/setup
In directory cvs.zope.org:/tmp/cvs-serv19743/lib/apelib/zope2/setup

Modified Files:
	dbtab.py patches.py 
Log Message:
Converted method and function names to conform with PEP 8.

PEP 8 (or perhaps the next revision) recommends 
lowercase_with_underscores over mixedCase.  Since everything is being 
renamed for this release anyway, why not throw in this too? :-)

Also got SQLMultiTableProperties back into shape.



=== Products/Ape/lib/apelib/zope2/setup/dbtab.py 1.3 => 1.4 ===
--- Products/Ape/lib/apelib/zope2/setup/dbtab.py:1.3	Tue Feb 17 00:25:14 2004
+++ Products/Ape/lib/apelib/zope2/setup/dbtab.py	Sat Mar 20 01:34:26 2004
@@ -16,12 +16,12 @@
 $Id$
 """
 
-def convertApeStorageArgs(name, factory=None, **kw):
-    from apelib.zodb3.db import callConfFactory
+def convert_ape_storage_args(name, factory=None, **kw):
+    from apelib.zodb3.db import call_conf_factory
     from apelib.zodb3.resource import StaticResource
     if factory is None:
         raise ValueError('factory is required')
-    conf, connections = callConfFactory(factory, kw)
+    conf, connections = call_conf_factory(factory, kw)
     return {
         'conf_resource': StaticResource(conf),
         'connections': connections,
@@ -35,6 +35,6 @@
     pass
 else:
     storage_types['ApeStorage'] = (
-        'apelib.zodb3.storage', convertApeStorageArgs)
+        'apelib.zodb3.storage', convert_ape_storage_args)
     database_types['ApeDB'] = 'apelib.zodb3.db'
 


=== Products/Ape/lib/apelib/zope2/setup/patches.py 1.2 => 1.3 ===
--- Products/Ape/lib/apelib/zope2/setup/patches.py:1.2	Sat Feb 28 15:06:29 2004
+++ Products/Ape/lib/apelib/zope2/setup/patches.py	Sat Mar 20 01:34:26 2004
@@ -18,22 +18,22 @@
 
 from Acquisition import aq_base
 
-from apelib.zodb3.utils import copyOf
+from apelib.zodb3.utils import zodb_copy
 
 
-def applyCopySupportPatch():
+def apply_copy_support_patch():
     # Fall back to copying by pickle when ZEXP export/import is not
     # implemented.
     def _getCopy(self, container):
         try:
             return self._real_getCopy(container)
         except NotImplementedError:
-            return copyOf(aq_base(self))
+            return zodb_copy(aq_base(self))
 
     from OFS.CopySupport import CopySource
     CopySource._real_getCopy = CopySource._getCopy
     CopySource._getCopy = _getCopy
 
 
-def applyPatches():
-    applyCopySupportPatch()
+def apply_patches():
+    apply_copy_support_patch()




More information about the Zope-CVS mailing list