server/sources/__init__.py
branchstable
changeset 7697 ef50074a0314
parent 7552 82dde8276a5b
child 7779 3826d8480a68
--- a/server/sources/__init__.py	Tue Jul 26 16:33:43 2011 +0200
+++ b/server/sources/__init__.py	Tue Jul 26 16:34:42 2011 +0200
@@ -25,6 +25,7 @@
 from logging import getLogger
 
 from logilab.common import configuration
+from logilab.common.deprecation import deprecated
 
 from yams.schema import role_name
 
@@ -269,12 +270,6 @@
 
     # external source api ######################################################
 
-    def eid2extid(self, eid, session=None):
-        return self.repo.eid2extid(self, eid, session)
-
-    def extid2eid(self, value, etype, session=None, **kwargs):
-        return self.repo.extid2eid(self, value, etype, session, **kwargs)
-
     def support_entity(self, etype, write=False):
         """return true if the given entity's type is handled by this adapter
         if write is true, return true only if it's a RW support
@@ -522,6 +517,15 @@
         pass
 
 
+    @deprecated('[3.13] use repo.eid2extid(source, eid, session)')
+    def eid2extid(self, eid, session=None):
+        return self.repo.eid2extid(self, eid, session)
+
+    @deprecated('[3.13] use extid2eid(source, value, etype, session, **kwargs)')
+    def extid2eid(self, value, etype, session=None, **kwargs):
+        return self.repo.extid2eid(self, value, etype, session, **kwargs)
+
+
 class TrFunc(object):
     """lower, upper"""
     def __init__(self, trname, index, attrname=None):