[Zope-Checkins]
SVN: Zope/branches/2.9/lib/python/Zope2/App/startup.py
Add 'stacklevel=2' to deprecation warning to show call site.
Tres Seaver
tseaver at palladion.com
Mon Dec 12 11:27:55 EST 2005
Log message for revision 40733:
Add 'stacklevel=2' to deprecation warning to show call site.
Thanks to Tim Peters for pointing out the flaw!
Changed:
U Zope/branches/2.9/lib/python/Zope2/App/startup.py
-=-
Modified: Zope/branches/2.9/lib/python/Zope2/App/startup.py
===================================================================
--- Zope/branches/2.9/lib/python/Zope2/App/startup.py 2005-12-12 16:14:45 UTC (rev 40732)
+++ Zope/branches/2.9/lib/python/Zope2/App/startup.py 2005-12-12 16:27:55 UTC (rev 40733)
@@ -304,7 +304,8 @@
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__
More information about the Zope-Checkins
mailing list