[Zodb-checkins] SVN: ZODB/trunk/src/transaction/_transaction.py
Merge rev 38779 from 3.5 branch.
Tim Peters
tim.one at comcast.net
Wed Oct 5 16:27:02 EDT 2005
Log message for revision 38780:
Merge rev 38779 from 3.5 branch.
A wordier stab at Florent's rev 38766.
More words in the subtransaction deprecation warning.
Changed:
U ZODB/trunk/src/transaction/_transaction.py
-=-
Modified: ZODB/trunk/src/transaction/_transaction.py
===================================================================
--- ZODB/trunk/src/transaction/_transaction.py 2005-10-05 20:25:26 UTC (rev 38779)
+++ ZODB/trunk/src/transaction/_transaction.py 2005-10-05 20:27:01 UTC (rev 38780)
@@ -361,16 +361,20 @@
subtransaction = 0
elif deprecation_wng:
from ZODB.utils import deprecated37
- deprecated37("subtransactions are deprecated; use "
- "transaction.savepoint() instead of "
- "transaction.commit(1)")
+ deprecated37("subtransactions are deprecated; instead of "
+ "transaction.commit(1), use "
+ "transaction.savepoint(optimistic=True) in "
+ "contexts where a subtransaction abort will never "
+ "occur, or sp=transaction.savepoint() if later "
+ "rollback is possible and then sp.rollback() "
+ "instead of transaction.abort(1)")
if self._savepoint2index:
self._invalidate_all_savepoints()
if subtransaction:
# TODO deprecate subtransactions
- self._subtransaction_savepoint = self.savepoint(1)
+ self._subtransaction_savepoint = self.savepoint(optimistic=True)
return
if self.status is Status.COMMITFAILED:
More information about the Zodb-checkins
mailing list