human
Complete this python program:
def deprecated_attribute(old, new, since=None, remove=None, doc=None):
assistant
#Here is the Python program you requested.

    """Attribute deprecation decorator for gentle upgrades
    For example:
    class MyClass (object):
    @deprecated_attribute(
    old=\abc\, new=\xyz\, since=(3, 2, 0), remove=(4, 1, 3))
    def abc(): return None
    def __init__(self):
    xyz = 5
    Note that the decorator needs a dummy method to attach to, but the
    content of the dummy method is ignored.
    """
    def _warn():
        version = u'.'.join((six.text_type(x) for x in since))
        message = [u'{}    has    been    deprecated    since    {}'.format(old, version)]
        if remove:
            version = u'.'.join((six.text_type(x) for x in remove))
            message.append(u'    and    will    be    removed    by    version    {}'.format(version))
        message.append(u'.        Use    {}    instead.'.format(new))
        logger.warning(u''.join(message))
        logger.debug(u''.join((six.text_type(x) for x in traceback.format_stack())))
    def fget(self):
        _warn()
        return getattr(self, new)
    def fset(self, value):
        _warn()
        setattr(self, new, value)
    def decorator(dummy):
        return property(fget=fget, fset=fset, doc=doc)
    return decorator