[Zodb-checkins]
SVN: ZODB/branches/3.5/src/transaction/_transaction.py
A wordier stab at Florent's rev 38766.
Tim Peters
tim.one at comcast.net
Wed Oct 5 16:25:27 EDT 2005
Log message for revision 38779:
A wordier stab at Florent's rev 38766.
More words in the subtransaction deprecation warning.
Changed:
U ZODB/branches/3.5/src/transaction/_transaction.py
-=-
Modified: ZODB/branches/3.5/src/transaction/_transaction.py
===================================================================
--- ZODB/branches/3.5/src/transaction/_transaction.py 2005-10-05 20:09:32 UTC (rev 38778)
+++ ZODB/branches/3.5/src/transaction/_transaction.py 2005-10-05 20:25:26 UTC (rev 38779)
@@ -363,16 +363,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