[Checkins] SVN: persistent/trunk/persistent/wref.py Don't import 'transaction' at module scope.
Tres Seaver
tseaver at palladion.com
Tue Sep 27 12:46:02 EST 2011
Log message for revision 122976:
Don't import 'transaction' at module scope.
It is used only in the doctests.
Changed:
U persistent/trunk/persistent/wref.py
-=-
Modified: persistent/trunk/persistent/wref.py
===================================================================
--- persistent/trunk/persistent/wref.py 2011-09-27 17:31:54 UTC (rev 122975)
+++ persistent/trunk/persistent/wref.py 2011-09-27 17:46:01 UTC (rev 122976)
@@ -19,7 +19,6 @@
__docformat__ = "reStructuredText"
from persistent import Persistent
-import transaction
WeakRefMarker = object()
@@ -33,6 +32,7 @@
Here's an example. We'll start by creating a persistent object and
a reference to it:
+ >>> import transaction
>>> import persistent, ZODB.tests.MinPO
>>> import ZODB.tests.util
>>> ob = ZODB.tests.MinPO.MinPO()
@@ -204,6 +204,7 @@
We'll start by creating a PersistentWeakKeyDictionary and adding
some persistent objects to it.
+ >>> import transaction
>>> d = PersistentWeakKeyDictionary()
>>> import ZODB.tests.util
>>> p1 = ZODB.tests.util.P('p1')
More information about the checkins
mailing list