o
    NK&h                     @   s:   d dl mZ d dlmZ d dlmZ dedefddZdS )	    )warn)is_atty)Colorsmessageversionc                 C   sX   |rd| nd}d| d}t  r#tj | }tj |  tj } t||  t dS )a  
    Add a deprecation notice

    Example when a feature is being removed. In this case, version
    should be AT LEAST next version + 2

    .. code-block:: python

        deprecation("Helpful message", 99.9)

    Example when a feature is deprecated but not being removed:

    .. code-block:: python

        deprecation("Helpful message", 0)

    Args:
        message (str): Deprecation message
        version (float): Version when the feature will be removed
    z v z[DEPRECATIONz] N)r   r   REDYELLOWENDr   DeprecationWarning)r   r   version_displayversion_info r   L/var/www/html/venv/lib/python3.10/site-packages/sanic/logging/deprecation.pydeprecation   s   r   N)	warningsr   sanic.helpersr   sanic.logging.colorr   strfloatr   r   r   r   r   <module>   s    