fix deprecation warnings
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 Jan 2010 13:38:02 +0100
changeset 4367 fa02f7dccfe4
parent 4366 d51f28ba9399
child 4368 d752ad901f14
fix deprecation warnings
devtools/testlib.py
server/migractions.py
--- a/devtools/testlib.py	Tue Jan 26 13:36:55 2010 +0100
+++ b/devtools/testlib.py	Tue Jan 26 13:38:02 2010 +0100
@@ -678,7 +678,8 @@
         return e
 
     @nocoverage
-    @deprecated('[3.4] use req = self.request(); rset = req.execute()')
+    @deprecated('[3.4] use req = self.request(); rset = req.execute()',
+                stacklevel=3)
     def rset_and_req(self, rql, optional_args=None, args=None, eidkey=None):
         """executes <rql>, builds a resultset, and returns a
         couple (rset, req) where req is a FakeRequest
--- a/server/migractions.py	Tue Jan 26 13:36:55 2010 +0100
+++ b/server/migractions.py	Tue Jan 26 13:38:02 2010 +0100
@@ -1135,7 +1135,7 @@
             self.commit()
         return entity
 
-    @deprecated('use create_entity')
+    @deprecated('[3.5] use create_entity', stacklevel=3)
     def cmd_add_entity(self, etype, *args, **kwargs):
         """add a new entity of the given type"""
         return self.cmd_create_entity(etype, *args, **kwargs).eid