Commit 1e8cf435 authored by Florent Guillaume's avatar Florent Guillaume

Clarified deprecation warning about txn.commit(1): the proper equivalent

now is txn.savepoint(optimistic=True).
parent 67b8b159
......@@ -362,7 +362,7 @@ class Transaction(object):
elif deprecation_wng:
from ZODB.utils import deprecated37
deprecated37("subtransactions are deprecated; use "
"transaction.savepoint() instead of "
"transaction.savepoint(optimistic=True) instead of "
"transaction.commit(1)")
if self._savepoint2index:
......@@ -370,7 +370,7 @@ class Transaction(object):
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment