stacklevel=3 for properties warnings
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Oct 2011 02:32:49 +0000 (19:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Oct 2011 02:32:49 +0000 (19:32 -0700)
There's an extra level for the @property wrapper.

pym/_emerge/FakeVartree.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py

index a2b923248ab24ab19fed74918540323b5b5d71ac..626d4719c22caad6219dce63a2d3779ee695f798 100644 (file)
@@ -77,7 +77,7 @@ class FakeVartree(vartree):
                        "_emerge.FakeVartree.FakeVartree"
                        " is deprecated. Use "
                        "settings['ROOT'] instead.",
-                       DeprecationWarning, stacklevel=2)
+                       DeprecationWarning, stacklevel=3)
                return self.settings['ROOT']
 
        def _match_wrapper(self, cpv, use_cache=1):
index 39bb030f9d77f09e517cb2a4f634ec8c49ef49a1..0fb8be9c5975237740b1f6693fd5d3879b4f3e8c 100644 (file)
@@ -349,7 +349,7 @@ class binarytree(object):
                        "portage.dbapi.bintree.binarytree"
                        " is deprecated. Use "
                        "settings['ROOT'] instead.",
-                       DeprecationWarning, stacklevel=2)
+                       DeprecationWarning, stacklevel=3)
                return self.settings['ROOT']
 
        def move_ent(self, mylist, repo_match=None):
index 6f3d90f735593f917a2869fca8eb53b1a2f11022..fc7feb3ba4ed49323f99eab780e20d9128618932 100644 (file)
@@ -1097,7 +1097,7 @@ class portagetree(object):
                        "portage.dbapi.porttree.portagetree" + \
                        " is deprecated. Use " + \
                        "settings['ROOT'] instead.",
-                       DeprecationWarning, stacklevel=2)
+                       DeprecationWarning, stacklevel=3)
                return self.settings['ROOT']
 
        def dep_bestmatch(self,mydep):
index f76645355588bac7ad2d10f12a6cc8f8c7d586fa..7f94cc5ca4dfccbd4a7943b93841e4f5e660bbf7 100644 (file)
@@ -180,7 +180,7 @@ class vardbapi(dbapi):
                        "portage.dbapi.vartree.vardbapi"
                        " is deprecated. Use "
                        "settings['ROOT'] instead.",
-                       DeprecationWarning, stacklevel=2)
+                       DeprecationWarning, stacklevel=3)
                return self.settings['ROOT']
 
        def getpath(self, mykey, filename=None):
@@ -1183,7 +1183,7 @@ class vartree(object):
                        "portage.dbapi.vartree.vartree"
                        " is deprecated. Use "
                        "settings['ROOT'] instead.",
-                       DeprecationWarning, stacklevel=2)
+                       DeprecationWarning, stacklevel=3)
                return self.settings['ROOT']
 
        def getpath(self, mykey, filename=None):