o
    Ñ­jÐ  ã                   @  s:   d dl mZ d dlZddlmZ 	ddddœddd„ZdS )é    )ÚannotationsNé   )Ú__version__F)ÚactionÚpluralÚ
deprecatedÚstrÚwhenú
int | NoneÚreplacementú
str | Noner   r   ÚboolÚreturnÚNonec                C  sè   |rdnd}|du rd}n2|t t d¡d ƒkr$| › d|› d�}t|ƒ‚|d	kr+d
}n|dkr2d}nd|› dt› d�}t|ƒ‚|rI|rId}t|ƒ‚|rRd|› d�}n|r^d| 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]."
    ÚareÚisNza future versionÚ.r   ú z" deprecated and should be removed.é   zPillow 11 (2024-10-15)é   zPillow 12 (2025-10-15)zUnknown removal version: z	. 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&   úK/var/www/html/CropPilot/venv/lib/python3.10/site-packages/PIL/_deprecate.pyÚ	deprecate   s2   !
ýr(   )N)r   r   r	   r
   r   r   r   r   r   r   r   r   )Ú
__future__r   r    r   r   r(   r&   r&   r&   r'   Ú<module>   s    ýú