
fg at nuxeo
Nov 2, 2005, 2:56 PM
Post #1 of 5
(5932 views)
Permalink
|
|
Re: SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/ transaction.commit(1) is deprecated in favor of transaction.savepoint().
|
|
Stefan H. Holek wrote: > Log message for revision 39807: > transaction.commit(1) is deprecated in favor of transaction.savepoint(). Actually, in favor of transaction.savepoint(optimistic=True). Florent > 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')) > > _______________________________________________ > Zope-Checkins maillist - Zope-Checkins [at] zope > http://mail.zope.org/mailman/listinfo/zope-checkins > -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg [at] nuxeo _______________________________________________ Zope-Coders mailing list Zope-Coders [at] zope http://mail.zope.org/mailman/listinfo/zope-coders
|