diff options
author | Sylvain <syt@logilab.fr> | 2007-11-26 10:37:43 +0100 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2007-11-26 10:37:43 +0100 |
commit | 05a400067b97e7d693caf2b67622f76faa6c6dcd (patch) | |
tree | 4af5579f007ec2a3982b101f5b013faf4ecacf44 /adbh.py | |
parent | 08c313d199cd3e0ad87c82b924f97ddb0b2fd010 (diff) | |
download | logilab-common-05a400067b97e7d693caf2b67622f76faa6c6dcd.tar.gz |
2.3 compatibility
Diffstat (limited to 'adbh.py')
-rw-r--r-- | adbh.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |