fix bw compat properties
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Aug 2009 11:06:46 +0200
changeset 2811 e1f3b8e7f19a
parent 2810 550dae61eb88
child 2812 b260ed87a650
fix bw compat properties
appobject.py
--- a/appobject.py	Thu Aug 13 11:06:07 2009 +0200
+++ b/appobject.py	Thu Aug 13 11:06:46 2009 +0200
@@ -342,15 +342,20 @@
             selector = (selector,)
         return selector
 
-    @classmethod
-    @deprecated('[3.5] use vreg.schema')
-    def schema(cls):
-        return cls.vreg.schema
+    @property
+    @deprecated('[3.5] use req.vreg')
+    def vreg(self):
+        return self.req.vreg
 
-    @classmethod
-    @deprecated('[3.5] use vreg.config')
-    def schema(cls):
-        return cls.vreg.config
+    @property
+    @deprecated('[3.5] use req.vreg.schema')
+    def schema(self):
+        return self.req.vreg.schema
+
+    @property
+    @deprecated('[3.5] use req.vreg.config')
+    def config(self):
+        return self.req.vreg.config
 
     @deprecated('[3.5] use req.varmaker')
     def initialize_varmaker(self):