[Zodb-checkins] CVS: Zope3/src/zodb/storage/tests - base.py:1.13.2.1
Jeremy Hylton
jeremy at zope.com
Thu Apr 17 16:51:45 EDT 2003
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv12300/tests
Modified Files:
Tag: jeremy-new-pack-branch
base.py
Log Message:
Use a ResolveObjectReader for zodb_unpickle().
We never want to load other persistent objects.
=== Zope3/src/zodb/storage/tests/base.py 1.13 => 1.13.2.1 ===
--- Zope3/src/zodb/storage/tests/base.py:1.13 Tue Apr 1 15:21:41 2003
+++ Zope3/src/zodb/storage/tests/base.py Thu Apr 17 15:51:45 2003
@@ -31,7 +31,8 @@
from transaction import get_transaction
from zodb.db import DB
-from zodb.serialize import ConnectionObjectReader, ObjectWriter, findrefs
+from zodb.serialize import ObjectWriter, findrefs
+from zodb.conflict import ResolveObjectReader
from zodb.ztransaction import Transaction
from zodb.storage.tests.minpo import MinPO
from zodb.storage.base import ZERO, BerkeleyConfig
@@ -57,7 +58,9 @@
def zodb_unpickle(data):
"""Unpickle an object stored using the format expected by ZODB."""
- u = ConnectionObjectReader(None, {})
+ # Use a ResolveObjectReader because we don't want to load any
+ # object referenced by this one.
+ u = ResolveObjectReader()
return u.getObject(data)
def handle_all_serials(oid, *args):
More information about the Zodb-checkins
mailing list