[deprecation] add (approximate) version number to deprecation message and set proper stacklevel stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 29 Aug 2013 16:20:33 +0200
branchstable
changeset 9228 90b8c7a7e205
parent 9227 762a331db741
child 9229 739ae5366bed
[deprecation] add (approximate) version number to deprecation message and set proper stacklevel
web/application.py
--- a/web/application.py	Thu Aug 29 12:55:27 2013 +0200
+++ b/web/application.py	Thu Aug 29 16:20:33 2013 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -455,8 +455,8 @@
                 req.update_search_state()
                 result = controller.publish(rset=rset)
             except StatusResponse as ex:
-                warn('StatusResponse is deprecated use req.status_out',
-                     DeprecationWarning)
+                warn('[3.16] StatusResponse is deprecated use req.status_out',
+                     DeprecationWarning, stacklevel=2)
                 result = ex.content
                 req.status_out = ex.status
             except Redirect as ex: