Florent Guillaume wrote:
Jim Fulton  <[EMAIL PROTECTED]> wrote:

Modified: ZODB/branches/3.4/src/transaction/_transaction.py
--- ZODB/branches/3.4/src/transaction/_transaction.py   2005-04-27 10:18:40 UTC
(rev 30199)
+++ ZODB/branches/3.4/src/transaction/_transaction.py   2005-04-27 11:20:56 UTC
+    # If savepoints are used, keep a weak key dict of them
+    _savepoints = {}

Isn't it dangerous to have this mutable class attribute? Later on the
code does:

+        if self._savepoints is None:
+            self._savepoints = {}
+        self._savepoints[ref] = self._savepoint_index

And also some dels.

So I'd say you meant to have None for the class attribute

Eek. Yup. Good catch. Thanks.

For a moment, I was surprised that the tests passed.
It appears that I was saved by the fact that items get removed
when the savepoints are garbage collected.

I'll check in a fix when the tests finish running.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to