o ai @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@dAdAeeZGdBdCdCeeZ'GdDdEdEeZ(GdFdGdGe)eZ*GdHdIdIeZ+GdJdKdKeZ,GdLdMdMeZ-dNS)O)absolute_import)IncompleteReadc@eZdZdZdS) HTTPErrorz#Base exception used by this module.N__name__ __module__ __qualname____doc__r r /builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/urllib3/exceptions.pyrrc@r) HTTPWarningz!Base warning used by this module.Nrr r r r rrrc@ eZdZdZddZddZdS) PoolErrorz/Base exception for errors caused within a pool.cCs||_t|d||fdS)Nz%s: %s)poolr__init__)selfrmessager r r rszPoolError.__init__cCs |jdfS)N)NN __class__rr r r __reduce__s zPoolError.__reduce__Nrr r r rrr r r r r rc@r) RequestErrorz8Base exception for PoolErrors that have associated URLs.cCs||_t|||dSN)urlrr)rrrrr r r r#szRequestError.__init__cCs|jd|jdffSr)rrrr r r r'szRequestError.__reduce__Nrr r r r r rrc@r)SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrr r r r r,rrc eZdZdZfddZZS) ProxyErrorz,Raised when the connection to a proxy fails.cs$tt|j||g|R||_dSr)superr!roriginal_error)rrerrorargsrr r r5s zProxyError.__init__rr r r r __classcell__r r rr r!2r!c@r) DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrr r r r r):rr)c@r) ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr r r r r*@rr*c@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}t||||dS)Nz0Max retries exceeded with url: %s (Caused by %r))reasonrr)rrrr,rr r r rWs zMaxRetryError.__init__rrr r r rr r r r r+Ms r+c@seZdZdZdddZdS)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)rrretries)rrrr0rr r r rbs zHostChangedError.__init__N)r/r-r r r r r._sr.c@r)TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNrr r r r r1hrr1c@r) TimeoutErrorzRaised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nrr r r r r2nsr2c@r)ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr r r r r3xrr3c@r)ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr r r r r4rr4c@r)NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r r r r5rr5c@r)EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r r r r6rr6c@r)ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r r r r7rr7c@r)LocationValueErrorzsr>c@r)SecurityWarningz0Warned when performing security reducing actionsNrr r r r rArrAc@r)SubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.Nrr r r r rBrrBc@r)InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrr r r r rCrrCc@r)SystemTimeWarningz0Warned when system time is suspected to be wrongNrr r r r rDrrDc@r)InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrr r r r rErrEc@r)SNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nrr r r r rFrrFc@r)DependencyWarningzc Warned when an attempt is made to import a module with missing optional dependencies. Nrr r r r rGrGc@r)ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrr r r r rIrrIc@r)BodyNotHttplibCompatiblez Body should be :class:`http.client.HTTPResponse` like (have an fp attribute which returns raw chunks) for read_chunked(). Nrr r r r rJrHrJc(eZdZdZfddZddZZS)rz Response length doesn't match expected Content-Length Subclass of :class:`http.client.IncompleteRead` to allow int value for ``partial`` to avoid creating large objects on streamed reads. cstt|||dSr)r"rr)rpartialexpectedrr r rszIncompleteRead.__init__cCd|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected))rLrMrr r r __repr__zIncompleteRead.__repr__rr r r rrOr'r r rr rs rcrK)InvalidChunkLengthz+Invalid chunk length in a chunked response.cs(tt|||j||_||_dSr)r"rRrtelllength_remainingresponselength)rrUrVrr r r s   zInvalidChunkLength.__init__cCrN)Nz0InvalidChunkLength(got length %r, %i bytes read))rVrLrr r r rOrPzInvalidChunkLength.__repr__rQr r rr rRs rRc@r) InvalidHeaderz(The header provided was somehow invalid.Nrr r r r rWrrWcr )ProxySchemeUnknownz1ProxyManager does not support the supplied schemecs6|dkrd}|dur d}nd|}tt||dS)N localhostz>Proxy URL had no scheme, should start with http:// or https://zCProxy URL had unsupported scheme %s, should use http:// or https://)r"rXrr=rr r r#szProxySchemeUnknown.__init__r&r r rr rXsrXc@r)ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrr r r r rZ2rrZcr )HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.cs$d|pd|f}tt||dS)Nz%s, unparsed data: %rUnknown)r"r[r)rdefects unparsed_datarrr r r;szHeaderParsingError.__init__r&r r rr r[8r(r[c@r)UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr r r r r_@rr_N). __future__rZpackages.six.moves.http_clientrhttplib_IncompleteRead ExceptionrWarningrrrrr!r)r*ConnectionErrorr+r.r1r2r3r4r5r6r7 ValueErrorr8r9r;r>rArBrCrDrErFrGrIrJrRrWAssertionErrorrXrZr[r_r r r r sP