Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
__builtin__.get_transaction() is officially deprecated in ZODB 3.4.
Browse files Browse the repository at this point in the history
Got rid of it in the Zope source.  The remaining instances are in
code stitched in from ZODB.  Those will go away by magic when
ZODB 3.4 gets stitched in.
  • Loading branch information
Tim Peters committed Mar 28, 2005
1 parent fb6b320 commit ec27da5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Version.py
Expand Up @@ -25,6 +25,8 @@
from OFS.ObjectManager import BeforeDeleteException
from cgi import escape

import transaction

class VersionException(BeforeDeleteException): pass

manage_addVersionForm=Globals.DTMLFile('dtml/versionAdd', globals())
Expand Down Expand Up @@ -154,7 +156,7 @@ def save(self, remark, REQUEST=None):
s=self.cookie
d=self._p_jar.getVersion()
if d==s: d=''
get_transaction().note(remark)
transaction.get().note(remark)
db.commitVersion(s, d)

if REQUEST is not None:
Expand All @@ -168,7 +170,7 @@ def discard(self, remark='', REQUEST=None):
Globals.VersionBase[self.cookie].abort()
else:
# ZODB 3
get_transaction().note(remark)
transaction.get().note(remark)
db.abortVersion(self.cookie)

if REQUEST is not None:
Expand Down

0 comments on commit ec27da5

Please sign in to comment.