[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/ Merge rev 28197 from ZODB 3.3 branch.

Dmitry Vasiliev dima at hlabs.spb.ru
Fri Oct 15 08:52:24 EDT 2004


Log message for revision 28198:
  Merge rev 28197 from ZODB 3.3 branch.
  
  Imports normalization.
  

Changed:
  U   ZODB/trunk/src/ZODB/BaseStorage.py
  U   ZODB/trunk/src/ZODB/ConflictResolution.py
  U   ZODB/trunk/src/ZODB/Connection.py
  U   ZODB/trunk/src/ZODB/DemoStorage.py
  U   ZODB/trunk/src/ZODB/ExportImport.py
  U   ZODB/trunk/src/ZODB/Mount.py

-=-
Modified: ZODB/trunk/src/ZODB/BaseStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/BaseStorage.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/BaseStorage.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -20,12 +20,10 @@
 import time
 import logging
 
-import UndoLogCompatible
-import POSException
 from persistent.TimeStamp import TimeStamp
 
-from ZODB import POSException, utils
-from ZODB.utils import z64
+from ZODB import POSException
+from ZODB.utils import z64, oid_repr
 from ZODB.UndoLogCompatible import UndoLogCompatible
 
 log = logging.getLogger("ZODB.BaseStorage")
@@ -402,7 +400,7 @@
             for r in transaction:
                 oid=r.oid
                 if verbose:
-                    print utils.oid_repr(oid), r.version, len(r.data)
+                    print oid_repr(oid), r.version, len(r.data)
                 if restoring:
                     self.restore(oid, r.tid, r.data, r.version,
                                  r.data_txn, transaction)

Modified: ZODB/trunk/src/ZODB/ConflictResolution.py
===================================================================
--- ZODB/trunk/src/ZODB/ConflictResolution.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/ConflictResolution.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -11,7 +11,7 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-import sys
+
 import logging
 from cStringIO import StringIO
 from cPickle import Unpickler, Pickler

Modified: ZODB/trunk/src/ZODB/Connection.py
===================================================================
--- ZODB/trunk/src/ZODB/Connection.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/Connection.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -20,10 +20,8 @@
 import threading
 import warnings
 from time import time
-from utils import u64
 
 from persistent import PickleCache
-from persistent.interfaces import IPersistent
 
 import transaction
 
@@ -33,7 +31,7 @@
      import ConflictError, ReadConflictError, InvalidObjectReference, \
             ConnectionStateError
 from ZODB.TmpStore import TmpStore
-from ZODB.utils import oid_repr, z64, positive_id
+from ZODB.utils import u64, oid_repr, z64, positive_id
 from ZODB.serialize import ObjectWriter, ConnectionObjectReader, myhasattr
 from ZODB.interfaces import IConnection
 from zope.interface import implements

Modified: ZODB/trunk/src/ZODB/DemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/DemoStorage.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/DemoStorage.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -80,9 +80,9 @@
 
 """
 
-import base64, time, string
-from ZODB import POSException, BaseStorage, utils
-from ZODB.utils import z64
+import base64, time
+from ZODB import POSException, BaseStorage
+from ZODB.utils import z64, oid_repr
 from persistent.TimeStamp import TimeStamp
 from cPickle import loads
 from BTrees import OOBTree
@@ -509,8 +509,8 @@
             o.append("  %s %s" % (TimeStamp(tid), p))
             for r in t:
                 oid, pre, vdata, p, tid = r
-                oid = utils.oid_repr(oid)
-                tid = utils.oid_repr(tid)
+                oid = oid_repr(oid)
+                tid = oid_repr(tid)
 ##                if serial is not None: serial=str(TimeStamp(serial))
                 pre=id(pre)
                 if vdata and vdata[1]: vdata=vdata[0], id(vdata[1])
@@ -523,7 +523,7 @@
         items.sort()
         for oid, r in items:
             if r: r=id(r)
-            o.append('  %s: %s' % (utils.oid_repr(oid), r))
+            o.append('  %s: %s' % (oid_repr(oid), r))
 
         o.append('\nVersion Index:')
         items=self._vindex.items()
@@ -534,6 +534,6 @@
             vitems.sort()
             for oid, r in vitems:
                 if r: r=id(r)
-                o.append('    %s: %s' % (utils.oid_repr(oid), r))
+                o.append('    %s: %s' % (oid_repr(oid), r))
 
-        return string.join(o,'\n')
+        return '\n'.join(o)

Modified: ZODB/trunk/src/ZODB/ExportImport.py
===================================================================
--- ZODB/trunk/src/ZODB/ExportImport.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/ExportImport.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -21,7 +21,6 @@
 from ZODB.POSException import ExportError
 from ZODB.utils import p64, u64
 from ZODB.serialize import referencesf
-import sys
 
 logger = logging.getLogger('ZODB.ExportImport')
 

Modified: ZODB/trunk/src/ZODB/Mount.py
===================================================================
--- ZODB/trunk/src/ZODB/Mount.py	2004-10-15 12:41:18 UTC (rev 28197)
+++ ZODB/trunk/src/ZODB/Mount.py	2004-10-15 12:52:23 UTC (rev 28198)
@@ -15,9 +15,7 @@
 
 $Id$"""
 
-import string
 import time
-import sys
 import thread
 import logging
 import persistent
@@ -187,7 +185,7 @@
             if newMount:
                 try: id = data.getId()
                 except: id = '???'  # data has no getId() method.  Bad.
-                p = string.join(parent.getPhysicalPath() + (id,), '/')
+                p = '/'.join(parent.getPhysicalPath() + (id,))
                 logger.info('Mounted database %s at %s',
                             self._getMountParams(), p)
         else:



More information about the Zodb-checkins mailing list