U
    g
                     @   sF   d Z dddgZG dd deZG dd deeZG dd deeZdS )z_This module contains classes used for warnings issued by this library.

.. versionadded:: 20.0
PTBDeprecationWarningPTBRuntimeWarningPTBUserWarningc                   @   s   e Zd ZdZdZdS )r   z
    Custom user warning class used for warnings in this library.

    .. seealso:: :wiki:`Exceptions, Warnings and Logging <Exceptions%2C-Warnings-and-Logging>`

    .. versionadded:: 20.0
     N__name__
__module____qualname____doc__	__slots__r   r   r   5/tmp/pip-unpacked-wheel-swnnwir2/telegram/warnings.pyr      s   c                   @   s   e Zd ZdZdZdS )r   ze
    Custom runtime warning class used for warnings in this library.

    .. versionadded:: 20.0
    r   Nr   r   r   r   r   r   &   s   c                   @   s4   e Zd ZdZdZeeddddZeddd	ZdS )
r   aX  
    Custom warning class for deprecations in this library.

    .. versionchanged:: 20.0
       Renamed TelegramDeprecationWarning to PTBDeprecationWarning.

    Args:
        version (:obj:`str`): The version in which the feature was deprecated.

            .. versionadded:: 21.2
        message (:obj:`str`): The message to display.

            .. versionadded:: 21.2

    Attributes:
        version (:obj:`str`): The version in which the feature was deprecated.

            .. versionadded:: 21.2
        message (:obj:`str`): The message to display.

            .. versionadded:: 21.2
    )messageversionN)r   r   returnc                 C   s   || _ || _d S )Nr   r   )selfr   r   r   r   r   __init__M   s    zPTBDeprecationWarning.__init__)r   c                 C   s   d| j  d| j S )zReturns a string representation of the warning, using :attr:`message` and
        :attr:`version`.

        .. versionadded:: 21.2
        zDeprecated since version z: r   )r   r   r   r   __str__Q   s    zPTBDeprecationWarning.__str__)r   r   r   r	   r
   strr   r   r   r   r   r   r   3   s   N)r	   __all__UserWarningr   RuntimeWarningr   DeprecationWarningr   r   r   r   r   <module>   s   
