[Zope-Checkins] SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ transaction.commit(1) is deprecated in favor of transaction.savepoint().

Stefan H. Holek stefan at epy.co.at
Tue Nov 1 08:00:43 EST 2005


Log message for revision 39807:
  transaction.commit(1) is deprecated in favor of transaction.savepoint().
  

Changed:
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py

-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt	2005-11-01 12:55:46 UTC (rev 39806)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt	2005-11-01 13:00:43 UTC (rev 39807)
@@ -1,4 +1,5 @@
 Unreleased
+- transaction.commit(1) is deprecated in favor of transaction.savepoint().
 - Don't break if Python distros ship without profile support (Debian, Ubuntu).
 - Functional.publish() would hang if it got a request_method argument other
   than GET or HEAD while omitting the stdin argument.

Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py	2005-11-01 12:55:46 UTC (rev 39806)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py	2005-11-01 13:00:43 UTC (rev 39807)
@@ -42,7 +42,7 @@
         self.folder.addDTMLMethod('doc', file='foo')
         # _p_oids are None until we commit a subtransaction
         self.assertEqual(self.folder._p_oid, None)
-        transaction.commit(1)
+        transaction.savepoint()
         self.failIfEqual(self.folder._p_oid, None)
 
     def testCutPaste(self):
@@ -93,7 +93,7 @@
         self.folder.addDTMLMethod('doc', file='foo')
         # _p_oids are None until we commit a subtransaction
         self.assertEqual(self.folder._p_oid, None)
-        transaction.commit(1)
+        transaction.savepoint()
         self.failIfEqual(self.folder._p_oid, None)
 
     def testExport(self):
@@ -315,7 +315,7 @@
     def testSubTransactionAbort(self):
         self.folder.foo = 1
         self.failUnless(hasattr(self.folder, 'foo'))
-        transaction.commit(1)
+        transaction.savepoint()
         transaction.abort()
         # This time the abort nukes the foo attribute...
         self.failIf(hasattr(self.folder, 'foo'))
@@ -330,7 +330,7 @@
     def testSubTransactionAbortPersistent(self):
         self.folder._p_foo = 1
         self.failUnless(hasattr(self.folder, '_p_foo'))
-        transaction.commit(1)
+        transaction.savepoint()
         transaction.abort()
         # This time the abort nukes the _p_foo attribute...
         self.failIf(hasattr(self.folder, '_p_foo'))
@@ -345,7 +345,7 @@
     def testSubTransactionAbortVolatile(self):
         self.folder._v_foo = 1
         self.failUnless(hasattr(self.folder, '_v_foo'))
-        transaction.commit(1)
+        transaction.savepoint()
         transaction.abort()
         # This time the abort nukes the _v_foo attribute...
         self.failIf(hasattr(self.folder, '_v_foo'))



More information about the Zope-Checkins mailing list