Commit 508849ab authored by Tim Peters's avatar Tim Peters

Expand the deprecation warning for get_transaction() to cover

the most common cases (commit() and abort()) -- it's not really
obvious that shortcut spelling exist for those.
parent 16c84148
...@@ -35,5 +35,7 @@ def abort(sub=False): ...@@ -35,5 +35,7 @@ def abort(sub=False):
def get_transaction(): def get_transaction():
from ZODB.utils import deprecated36 from ZODB.utils import deprecated36
deprecated36(" use transaction.get() instead of get_transaction()") deprecated36(""" use transaction.get() instead of get_transaction().
transaction.commit() is a shortcut spelling of transaction.get().commit(),
and transaction.abort() of transaction.get().abort().""")
return get() return get()
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