3 Bu_@s\ddlmZddlmZGdddeZGdddeZGdd d eZ Gd d d e Z Gd d d eZ GdddeZ GdddeZ GdddeZeZGddde ZGddde ZGdddeZGdddeZGdddee ZGdddeZGd d!d!ee ZGd"d#d#e ZGd$d%d%e ZGd&d'd'eeZGd(d)d)eZGd*d+d+eZGd,d-d-eZGd.d/d/eZGd0d1d1eZGd2d3d3eZ Gd4d5d5eZ!Gd6d7d7eZ"Gd8d9d9eZ#Gd:d;d;eZ$Gdd?d?eZ&Gd@dAdAeeZGdBdCdCeZ'GdDdEdEe(eZ)GdFdGdGeZ*GdHdIdIeZ+dJS)K)absolute_import)IncompleteReadc@seZdZdZdS) HTTPErrorz#Base exception used by this module.N)__name__ __module__ __qualname____doc__r r /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-1.el7.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/urllib3/exceptions.pyrsrc@seZdZdZdS) HTTPWarningz!Base warning used by this module.N)rrrr r r r r r sr c@s eZdZdZddZddZdS) PoolErrorz/Base exception for errors caused within a pool.cCs||_tj|d||fdS)Nz%s: %s)poolr__init__)selfrmessager r r rszPoolError.__init__cCs |jdfS)N)NN) __class__)rr r r __reduce__szPoolError.__reduce__N)rrrr rrr r r r r sr c@s eZdZdZddZddZdS) RequestErrorz8Base exception for PoolErrors that have associated URLs.cCs||_tj|||dS)N)urlr r)rrrrr r r r szRequestError.__init__cCs|jd|jdffS)N)rr)rr r r r$szRequestError.__reduce__N)rrrr rrr r r r rsrc@seZdZdZdS)SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.N)rrrr r r r r r)srcs eZdZdZfddZZS) ProxyErrorz,Raised when the connection to a proxy fails.cs"tt|j||f|||_dS)N)superrroriginal_error)rrerrorargs)rr r r1szProxyError.__init__)rrrr r __classcell__r r )rr r.src@seZdZdZdS) DecodeErrorz;Raised when automatic decoding based on Content-Type fails.N)rrrr r r r r r6src@seZdZdZdS) ProtocolErrorz>Raised when something unexpected happens mid-request/response.N)rrrr r r r r r;src@seZdZdZdddZdS) 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}tj||||dS)Nz0Max retries exceeded with url: %s (Caused by %r))reasonrr)rrrr rr r r rQs zMaxRetryError.__init__)N)rrrr rr r r r rGsrc@seZdZdZdddZdS)HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.cCs"d|}tj||||||_dS)Nz)Tried to open a foreign host with url: %s)rrretries)rrrr#rr r r r\szHostChangedError.__init__N)r")rrrr rr r r r r!Ysr!c@seZdZdZdS)TimeoutStateErrorz3 Raised when passing an invalid state to a timeout N)rrrr r r r r r$bsr$c@seZdZdZdS) TimeoutErrorz Raised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. N)rrrr r r r r r%hsr%c@seZdZdZdS)ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverN)rrrr r r r r r&rsr&c@seZdZdZdS)ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverN)rrrr r r r r r'ysr'c@seZdZdZdS)NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.N)rrrr r r r r r(~sr(c@seZdZdZdS)EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.N)rrrr r r r r r)sr)c@seZdZdZdS)ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.N)rrrr r r r r r*sr*c@seZdZdZdS)LocationValueErrorzsr>cs eZdZdZfddZZS)ProxySchemeUnknownz1ProxyManager does not support the supplied schemecsd|}tt|j|dS)NzNot supported proxy scheme %s)rr?r)rschemer)rr r rszProxySchemeUnknown.__init__)rrrr rrr r )rr r?sr?cs eZdZdZfddZZS)HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.cs$d|pd|f}tt|j|dS)Nz%s, unparsed data: %rUnknown)rrAr)rdefects unparsed_datar)rr r r szHeaderParsingError.__init__)rrrr rrr r )rr rAsrAc@seZdZdZdS)UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyN)rrrr r r r r rEsrEN), __future__rZpackages.six.moves.http_clientrhttplib_IncompleteRead ExceptionrWarningr r rrrrrConnectionErrorrr!r$r%r&r'r(r)r* ValueErrorr+r,r.r1r2r3r4r5r6r7r8r9r:r>AssertionErrorr?rArEr r r r sJ