U
    %d                  	   @  sF   d dl mZ d dlZddlmZ ddddddd	d	d
ddddZdS )    )annotationsN   )__version__F)actionpluralstrz
int | Nonez
str | NoneboolNone)
deprecatedwhenreplacementr   r   returnc                C  s   |rdnd}|dkrd}nR|t tdd krJ|  d| d}t|n"|d	krXd
}ndt d}t||r|rd}t||rd| d}n|rd|d d}nd}tj|  d| d| | t	dd dS )a.  
    Deprecations helper.

    :param deprecated: Name of thing to be deprecated.
    :param when: Pillow major version to be removed in.
    :param replacement: Name of replacement.
    :param action: Instead of "replacement", give a custom call to action
        e.g. "Upgrade to new thing".
    :param plural: if the deprecated thing is plural, needing "are" instead of "is".

    Usually of the form:

        "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd).
        Use [replacement] instead."

    You can leave out the replacement sentence:

        "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd)"

    Or with another call to action:

        "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd).
        [action]."
    ZareisNza future version.r    z" deprecated and should be removed.
   zPillow 10 (2023-07-01)z Unknown removal version, update ?z*Use only one of 'replacement' and 'action'z. Use z	 instead.z.  z# deprecated and will be removed in    )
stacklevel)
intr   splitRuntimeError__name__
ValueErrorrstripwarningswarnDeprecationWarning)r
   r   r   r   r   is_removedmsg r"   2/tmp/pip-unpacked-wheel-pyoxjemt/PIL/_deprecate.py	deprecate   s.    !
r$   )N)
__future__r   r   r   r   r$   r"   r"   r"   r#   <module>   s    