U ��.e��@sLddlmZddlmZGdd�de�ZGdd�de�ZGdd �d e�Z Gd d �d e �Z Gd d �d e�Z Gdd�de�Z Gdd�de�Z Gdd�de�ZeZGdd�de �ZGdd�de �ZGdd�de�ZGdd�de�ZGdd�dee �ZGdd�de�ZGd d!�d!ee �ZGd"d#�d#e �ZGd$d%�d%e �ZGd&d'�d'ee�ZGd(d)�d)e�ZGd*d+�d+e�ZGd,d-�d-e�ZGd.d/�d/e�ZGd0d1�d1e�ZGd2d3�d3e�Z Gd4d5�d5e�Z!Gd6d7�d7e�Z"Gd8d9�d9e�Z#Gd:d;�d;ee�Z$Gdd?�d?ee�ZGd@dA�dAe�Z&GdBdC�dCe'e�Z(GdDdE�dEe�Z)GdFdG�dGe�Z*dHS)I�)�absolute_import�)�IncompleteReadc@seZdZdZdS)� HTTPErrorz#Base exception used by this module.N��__name__� __module__� __qualname__�__doc__�r r �B/usr/lib/python3.8/site-packages/pip/_vendor/urllib3/exceptions.pyrsrc@seZdZdZdS)� HTTPWarningz!Base warning used by this module.Nrr r r r r sr c@s eZdZdZdd�Zdd�ZdS)� PoolErrorz/Base exception for errors caused within a pool.cCs||_t�|d||f�dS)Nz%s: %s)�poolr�__init__)�selfr�messager r r rszPoolError.__init__cCs |jdfS)N)NN�� __class__�rr r r � __reduce__szPoolError.__reduce__N�rrr r rrr r r r rsrc@s eZdZdZdd�Zdd�ZdS)� RequestErrorz8Base exception for PoolErrors that have associated URLs.cCs||_t�|||�dS�N)�urlrr)rrrrr r r r szRequestError.__init__cCs|jd|jdffSr)rrrr r r r$szRequestError.__reduce__Nrr r r r rsrc@seZdZdZdS)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrr r r r r)src@seZdZdZdS)� ProxyErrorz,Raised when the connection to a proxy fails.Nrr r r r r.src@seZdZdZdS)� DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrr r r r r3src@seZdZdZdS)� ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr r r r r8src@seZdZdZddd�ZdS)� MaxRetryErrora Raised when the maximum number of retries is exceeded. :param pool: The connection pool :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool` :param string url: The requested Url :param exceptions.Exception reason: The underlying error NcCs&||_d||f}t�||||�dS)Nz0Max retries exceeded with url: %s (Caused by %r))�reasonrr)rrrr rr r r rNs zMaxRetryError.__init__)N�rrr r rr r r r rDs rc@seZdZdZddd�ZdS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.�cCs"d|}t�||||�||_dS)Nz)Tried to open a foreign host with url: %s)rr�retries)rrrr$rr r r rYszHostChangedError.__init__N)r#r!r r r r r"Vsr"c@seZdZdZdS)�TimeoutStateErrorz3 Raised when passing an invalid state to a timeout Nrr r r r r%_sr%c@seZdZdZdS)� TimeoutErrorz� Raised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nrr r r r r&esr&c@seZdZdZdS)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr r r r r'osr'c@seZdZdZdS)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr r r r r(vsr(c@seZdZdZdS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r r r r){sr)c@seZdZdZdS)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r r r r*�sr*c@seZdZdZdS)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r r r r+�sr+c@seZdZdZdS)�LocationValueErrorz�sr>cs eZdZdZ�fdd�Z�ZS)�ProxySchemeUnknownz1ProxyManager does not support the supplied schemecsd|}tt|��|�dS)NzNot supported proxy scheme %s)r9r?r)rZschemerrr r r�szProxySchemeUnknown.__init__�rrr r rr=r r rr r?�sr?cs eZdZdZ�fdd�Z�ZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.cs$d|pd|f}tt|��|�dS)Nz%s, unparsed data: %rZUnknown)r9rAr)rZdefectsZ unparsed_datarrr r r�szHeaderParsingError.__init__r@r r rr rA�srAc@seZdZdZdS)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr r r r rB�srBN)+Z __future__rZpackages.six.moves.http_clientrZhttplib_IncompleteRead� Exceptionr�Warningr rrrrrr�ConnectionErrorrr"r%r&r'r(r)r*r+� ValueErrorr,r-r/r0r1r2r3r4r5r6r7r8r>�AssertionErrorr?rArBr r r r �sH