summaryrefslogtreecommitdiff
path: root/adbh.py
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2007-11-26 10:37:43 +0100
committerSylvain <syt@logilab.fr>2007-11-26 10:37:43 +0100
commit05a400067b97e7d693caf2b67622f76faa6c6dcd (patch)
tree4af5579f007ec2a3982b101f5b013faf4ecacf44 /adbh.py
parent08c313d199cd3e0ad87c82b924f97ddb0b2fd010 (diff)
downloadlogilab-common-05a400067b97e7d693caf2b67622f76faa6c6dcd.tar.gz
2.3 compatibility
Diffstat (limited to 'adbh.py')
-rw-r--r--adbh.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/adbh.py b/adbh.py
index 6628841..1c8612b 100644
--- a/adbh.py
+++ b/adbh.py
@@ -124,23 +124,25 @@ class _GenericAdvFuncHelper:
}
- @classmethod
+ #@classmethod
def register_function(cls, funcdef):
if isinstance(funcdef, basestring) :
funcdef = FunctionDescr(funcdef.upper())
assert not funcdef.name in cls.FUNCTIONS, \
'%s is already registered' % funcdef.name
cls.FUNCTIONS[funcdef.name] = funcdef
-
- @classmethod
+ register_function = classmethod(register_function)
+
+ #@classmethod
def function_description(cls, funcname):
"""return the description (`FunctionDescription`) for a RQL function"""
try:
return cls.FUNCTIONS[funcname.upper()]
except KeyError:
raise UnsupportedFunction(funcname)
+ function_description = classmethod(function_description)
- # @obsolete('use users_support attribute')
+ #@obsolete('use users_support attribute')
def support_users(self):
"""return True if the DBMS support users (this is usually
not true for in memory DBMS)
@@ -148,7 +150,7 @@ class _GenericAdvFuncHelper:
return self.users_support
support_user = obsolete('use users_support attribute')(support_users)
- # @obsolete('use groups_support attribute')
+ #@obsolete('use groups_support attribute')
def support_groups(self):
"""return True if the DBMS support groups"""
return self.groups_support