def deprecated(since=None, message=None):
    def decorator(func):
        if since is None:
            buf = 'Method %s is deprecated.' % func.__name__
        else:
            buf = 'Method %s has been deprecated since version %s.' %\
                  (func.__name__, since)

        if message:
            buf += ' ' + message

        def wrapper(*__args, **__kw):
            import warnings
            warnings.warn(buf, category=DeprecationWarning, stacklevel=2)
            return func(*__args,**__kw)

        wrapper.__name__ = func.__name__
        wrapper.__dict__ = func.__dict__
        wrapper.__doc__ = func.__doc__
        return wrapper

    return decorator
Decorator for marking a function deprecated. Generates a warning on
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/grizzled/grizzled/decorators.py/deprecated