[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/Owned.py Display offending line when warning about getOwner(1) deprecation.

Florent Guillaume fg at nuxeo.com
Mon Aug 1 16:08:03 EDT 2005


Log message for revision 37633:
  Display offending line when warning about getOwner(1) deprecation.
  

Changed:
  U   Zope/trunk/lib/python/AccessControl/Owned.py

-=-
Modified: Zope/trunk/lib/python/AccessControl/Owned.py
===================================================================
--- Zope/trunk/lib/python/AccessControl/Owned.py	2005-08-01 20:05:59 UTC (rev 37632)
+++ Zope/trunk/lib/python/AccessControl/Owned.py	2005-08-01 20:08:03 UTC (rev 37633)
@@ -82,7 +82,7 @@
             import warnings
             warnings.warn('Owned.getOwner(1) is deprecated; '
                           'please use getOwnerTuple() instead.',
-                          DeprecationWarning)
+                          DeprecationWarning, stacklevel=2)
 
 
         owner=aq_get(self, '_owner', None, 1)



More information about the Zope-Checkins mailing list