import functools
from warnings import warn


def obsolete_command(f):
    """Decorator to add a warning when a command is obsolete and will be removed."""

    @functools.wraps(f)
    def wrapper(*args, **kwargs):
        warn("This command is obsolete and will be removed in a feature release.")
        return f(*args, **kwargs)

    return wrapper