[Checkins] SVN: z3c.zalchemy/branches/brandon-sqlalchemy04-experiment/src/z3c/zalchemy/datamanager.py SQLAlchemy 0.4 compatibility: commit() and rollback() should now be

Brandon Rhodes brandon at rhodesmill.org
Mon Nov 12 19:59:44 EST 2007


Log message for revision 81801:
  SQLAlchemy 0.4 compatibility: commit() and rollback() should now be
  called directly on the "session", rather than on the second-tier
  "session.transaction" object, which I don't see mentioned in the new
  SQLAlchemy documentation, and may not be officially supported in 0.4.
  

Changed:
  U   z3c.zalchemy/branches/brandon-sqlalchemy04-experiment/src/z3c/zalchemy/datamanager.py

-=-
Modified: z3c.zalchemy/branches/brandon-sqlalchemy04-experiment/src/z3c/zalchemy/datamanager.py
===================================================================
--- z3c.zalchemy/branches/brandon-sqlalchemy04-experiment/src/z3c/zalchemy/datamanager.py	2007-11-13 00:58:00 UTC (rev 81800)
+++ z3c.zalchemy/branches/brandon-sqlalchemy04-experiment/src/z3c/zalchemy/datamanager.py	2007-11-13 00:59:44 UTC (rev 81801)
@@ -198,10 +198,9 @@
 
     def __init__(self, session):
         self.session = session
-        self.transaction = session.create_transaction()
 
     def abort(self, trans):
-        self.transaction.rollback()
+        self.session.rollback()
         self._cleanup()
 
     def commit(self, trans):
@@ -214,11 +213,11 @@
         pass
 
     def tpc_finish(self, trans):
-        self.transaction.commit()
+        self.session.commit()
         self._cleanup()
 
     def tpc_abort(self, trans):
-        self.transaction.rollback()
+        self.session.rollback()
         self._cleanup()
 
     def sortKey(self):



More information about the Checkins mailing list