3
†dj  ã               @   sÂ  d Z ddlmZ ddlmZ G dd„ deƒZG dd„ deƒZ	G d	d
„ d
e	eƒZG dd„ deƒZG dd„ deƒZ
G dd„ de
ƒZG dd„ de
ƒZG dd„ deƒZG dd„ de
eƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deeƒZG dd „ d eeƒZG d!d"„ d"eeƒZG d#d$„ d$eeƒZG d%d&„ d&eƒZG d'd(„ d(eƒZG d)d*„ d*eeƒZG d+d,„ d,eeƒZG d-d.„ d.eƒZG d/d0„ d0eƒZG d1d2„ d2eƒZG d3d4„ d4ee ƒZ!G d5d6„ d6eƒZ"d7S )8z`
requests.exceptions
~~~~~~~~~~~~~~~~~~~

This module contains the set of Requests' exceptions.
é    )Ú	HTTPErroré   )ÚJSONDecodeErrorc                   s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚRequestExceptionzTThere was an ambiguous exception that occurred while handling your
    request.
    c                sZ   |j ddƒ}|| _|j ddƒ| _|dk	rD| j rDt|dƒrD| jj| _tt| ƒj||Ž dS )zBInitialize RequestException with `request` and `response` objects.ÚresponseNÚrequest)Úpopr   r   ÚhasattrÚsuperr   Ú__init__)ÚselfÚargsÚkwargsr   )Ú	__class__© ú7/tmp/pip-build-7vycvbft/requests/requests/exceptions.pyr      s    

zRequestException.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r   r   )r   r   r      s   r   c               @   s   e Zd ZdZdS )ÚInvalidJSONErrorzA JSON error occurred.N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )r   z"Couldn't decode the text into jsonN)r   r   r   r   r   r   r   r   r   "   s   r   c               @   s   e Zd ZdZdS )r   zAn HTTP error occurred.N)r   r   r   r   r   r   r   r   r   &   s   r   c               @   s   e Zd ZdZdS )ÚConnectionErrorzA Connection error occurred.N)r   r   r   r   r   r   r   r   r   *   s   r   c               @   s   e Zd ZdZdS )Ú
ProxyErrorzA proxy error occurred.N)r   r   r   r   r   r   r   r   r   .   s   r   c               @   s   e Zd ZdZdS )ÚSSLErrorzAn SSL error occurred.N)r   r   r   r   r   r   r   r   r   2   s   r   c               @   s   e Zd ZdZdS )ÚTimeoutz«The request timed out.

    Catching this error will catch both
    :exc:`~requests.exceptions.ConnectTimeout` and
    :exc:`~requests.exceptions.ReadTimeout` errors.
    N)r   r   r   r   r   r   r   r   r   6   s   r   c               @   s   e Zd ZdZdS )ÚConnectTimeoutz‚The request timed out while trying to connect to the remote server.

    Requests that produced this error are safe to retry.
    N)r   r   r   r   r   r   r   r   r   ?   s   r   c               @   s   e Zd ZdZdS )ÚReadTimeoutz@The server did not send any data in the allotted amount of time.N)r   r   r   r   r   r   r   r   r   F   s   r   c               @   s   e Zd ZdZdS )ÚURLRequiredz*A valid URL is required to make a request.N)r   r   r   r   r   r   r   r   r   J   s   r   c               @   s   e Zd ZdZdS )ÚTooManyRedirectszToo many redirects.N)r   r   r   r   r   r   r   r   r   N   s   r   c               @   s   e Zd ZdZdS )ÚMissingSchemaz/The URL scheme (e.g. http or https) is missing.N)r   r   r   r   r   r   r   r   r    R   s   r    c               @   s   e Zd ZdZdS )ÚInvalidSchemaz9The URL scheme provided is either invalid or unsupported.N)r   r   r   r   r   r   r   r   r!   V   s   r!   c               @   s   e Zd ZdZdS )Ú
InvalidURLz%The URL provided was somehow invalid.N)r   r   r   r   r   r   r   r   r"   Z   s   r"   c               @   s   e Zd ZdZdS )ÚInvalidHeaderz.The header value provided was somehow invalid.N)r   r   r   r   r   r   r   r   r#   ^   s   r#   c               @   s   e Zd ZdZdS )ÚInvalidProxyURLz"The proxy URL provided is invalid.N)r   r   r   r   r   r   r   r   r$   b   s   r$   c               @   s   e Zd ZdZdS )ÚChunkedEncodingErrorz?The server declared chunked encoding but sent an invalid chunk.N)r   r   r   r   r   r   r   r   r%   f   s   r%   c               @   s   e Zd ZdZdS )ÚContentDecodingErrorz"Failed to decode response content.N)r   r   r   r   r   r   r   r   r&   j   s   r&   c               @   s   e Zd ZdZdS )ÚStreamConsumedErrorz3The content for this response was already consumed.N)r   r   r   r   r   r   r   r   r'   n   s   r'   c               @   s   e Zd ZdZdS )Ú
RetryErrorzCustom retries logic failedN)r   r   r   r   r   r   r   r   r(   r   s   r(   c               @   s   e Zd ZdZdS )ÚUnrewindableBodyErrorz;Requests encountered an error when trying to rewind a body.N)r   r   r   r   r   r   r   r   r)   v   s   r)   c               @   s   e Zd ZdZdS )ÚRequestsWarningzBase warning for Requests.N)r   r   r   r   r   r   r   r   r*   |   s   r*   c               @   s   e Zd ZdZdS )ÚFileModeWarningzJA file was opened in text mode, but Requests determined its binary length.N)r   r   r   r   r   r   r   r   r+   €   s   r+   c               @   s   e Zd ZdZdS )ÚRequestsDependencyWarningz@An imported dependency doesn't match the expected version range.N)r   r   r   r   r   r   r   r   r,   „   s   r,   N)#r   Zurllib3.exceptionsr   ÚBaseHTTPErrorÚcompatr   ZCompatJSONDecodeErrorÚIOErrorr   r   r   r   r   r   r   r   r   r   Ú
ValueErrorr    r!   r"   r#   r$   r%   r&   Ú	TypeErrorr'   r(   r)   ÚWarningr*   ÚDeprecationWarningr+   r,   r   r   r   r   Ú<module>   s6   	