[Zodb-checkins] SVN: ZODB/branches/3.8/ Follow-up to r91064 to also allow deep-copied blobs to be opened (also see http://mail.zope.org/pipermail/zodb-dev/2008-August/012054.html).
Andreas Zeidler
az at zitc.de
Wed Sep 24 11:53:05 EDT 2008
Log message for revision 91439:
Follow-up to r91064 to also allow deep-copied blobs to be opened (also see http://mail.zope.org/pipermail/zodb-dev/2008-August/012054.html).
Changed:
U ZODB/branches/3.8/NEWS.txt
U ZODB/branches/3.8/src/ZODB/blob.py
U ZODB/branches/3.8/src/ZODB/tests/testblob.py
-=-
Modified: ZODB/branches/3.8/NEWS.txt
===================================================================
--- ZODB/branches/3.8/NEWS.txt 2008-09-24 15:52:43 UTC (rev 91438)
+++ ZODB/branches/3.8/NEWS.txt 2008-09-24 15:53:03 UTC (rev 91439)
@@ -4,6 +4,8 @@
Bugs Fixed:
+- (beta 9) Fixed a bug to allow opening of deep-copied blobs.
+
- (beta 9) Fixed bug #189542 by prepending the module to an undefined name.
- (beta 8) If there is a failure while FileStorage is finalizing a transaction,
Modified: ZODB/branches/3.8/src/ZODB/blob.py
===================================================================
--- ZODB/branches/3.8/src/ZODB/blob.py 2008-09-24 15:52:43 UTC (rev 91438)
+++ ZODB/branches/3.8/src/ZODB/blob.py 2008-09-24 15:53:03 UTC (rev 91439)
@@ -125,6 +125,9 @@
if self.writers:
raise BlobError("Already opened for writing.")
+ if self.readers is None:
+ self.readers = []
+
if mode == 'r':
if self._current_filename() is None:
self._create_uncommitted_file()
Modified: ZODB/branches/3.8/src/ZODB/tests/testblob.py
===================================================================
--- ZODB/branches/3.8/src/ZODB/tests/testblob.py 2008-09-24 15:52:43 UTC (rev 91438)
+++ ZODB/branches/3.8/src/ZODB/tests/testblob.py 2008-09-24 15:53:03 UTC (rev 91439)
@@ -140,7 +140,11 @@
clone = u.load()
clone._p_invalidate()
+ # it should also be possible to open the cloned blob
+ # (even though it won't contain the original data)
+ clone.open()
+
class BlobUndoTests(BlobTests):
def testUndoWithoutPreviousVersion(self):
More information about the Zodb-checkins
mailing list