[Zodb-checkins] SVN: ZODB/branches/blob-merge-branch/src/ZODB/Blobs/ - fixed test breakage

Christian Theune ct at gocept.com
Fri Sep 22 03:50:10 EDT 2006


Log message for revision 70329:
   - fixed test breakage
  

Changed:
  U   ZODB/branches/blob-merge-branch/src/ZODB/Blobs/Blob.py
  U   ZODB/branches/blob-merge-branch/src/ZODB/Blobs/BlobStorage.py
  U   ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt

-=-
Modified: ZODB/branches/blob-merge-branch/src/ZODB/Blobs/Blob.py
===================================================================
--- ZODB/branches/blob-merge-branch/src/ZODB/Blobs/Blob.py	2006-09-22 06:54:37 UTC (rev 70328)
+++ ZODB/branches/blob-merge-branch/src/ZODB/Blobs/Blob.py	2006-09-22 07:50:09 UTC (rev 70329)
@@ -196,13 +196,14 @@
 
     def __init__(self, blob, filehandle, tm):
         self.blob = blob
-        self.transaction_manager = tm
+        self.transaction = tm.get()
         # we keep a weakref to the file handle because we don't want to
         # keep it alive if all other references to it die (e.g. in the
         # case it's opened without assigning it to a name).
         self.fhrefs = utils.WeakSet()
         self.register_fh(filehandle)
         self.sortkey = time.time()
+        self.prepared = False
 
     # Blob specific methods
 
@@ -257,7 +258,6 @@
         self._checkTransaction(transaction)
         self.prepared = True
         self.transaction = transaction
-        self.state += self.delta
 
     def _checkTransaction(self, transaction):
         if (self.transaction is not None and

Modified: ZODB/branches/blob-merge-branch/src/ZODB/Blobs/BlobStorage.py
===================================================================
--- ZODB/branches/blob-merge-branch/src/ZODB/Blobs/BlobStorage.py	2006-09-22 06:54:37 UTC (rev 70328)
+++ ZODB/branches/blob-merge-branch/src/ZODB/Blobs/BlobStorage.py	2006-09-22 07:50:09 UTC (rev 70329)
@@ -44,11 +44,11 @@
     __slots__ = ('fshelper', 'dirty_oids')
 
     def __new__(self, base_directory, storage):
-        return zope.decorator.Decorator.__new__(self, storage)
+        return SpecificationDecoratorBase.__new__(self, storage)
 
     def __init__(self, base_directory, storage):
-        # TODO Log warning if storage is ClientStorage
-        zope.decorator.Decorator.__init__(self, storage)
+        # XXX Log warning if storage is ClientStorage
+        SpecificationDecoratorBase.__init__(self, storage)
         self.fshelper = FilesystemHelper(base_directory)
         self.fshelper.create()
         self.fshelper.checkSecure()

Modified: ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt
===================================================================
--- ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt	2006-09-22 06:54:37 UTC (rev 70328)
+++ ZODB/branches/blob-merge-branch/src/ZODB/Blobs/tests/transaction.txt	2006-09-22 07:50:09 UTC (rev 70329)
@@ -231,7 +231,7 @@
     >>> savepoint = transaction.savepoint()             # doctest: +ELLIPSIS
     Traceback (most recent call last):
         ...
-    TypeError: ('Savepoints unsupported', <MultiObjectResourceAdapter for <ZODB.Blobs.Blob.BlobDataManager instance at ...> at ...>)
+    TypeError: ('Savepoints unsupported', <transaction._transaction.DataManagerAdapter object at 0x...>)
 
 
 Teardown



More information about the Zodb-checkins mailing list