Commit 3f5b34f6 authored by Tres Seaver's avatar Tres Seaver

Add 'stacklevel=2' to deprecation warning to show call site.

Thanks to Tim Peters for pointing out the flaw!
parent b3059f1b
......@@ -304,7 +304,8 @@ get_transaction(). transaction.commit() is a shortcut spelling of
transaction.get().commit(), and transaction.abort() of
transaction.get().abort().
"""
warnings.warn(_GET_TRANSACTION_DEPRECATED, DeprecationWarning)
warnings.warn(_GET_TRANSACTION_DEPRECATED, DeprecationWarning,
stacklevel=2)
return transaction.get()
import __builtin__
......
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