fg <ddlmZddlmZGddeZGddeZGddeZ Gd d e Z Gd d eZ Gd deZ GddeZ GddeZeZGdde ZGdde ZGddeZGddeZGddee ZGddeZGdd ee ZGd!d"e ZGd#d$e ZGd%d&eeZGd'd(eZGd)d*eZGd+d,eZGd-d.eZGd/d0eZGd1d2eZ Gd3d4eZ!Gd5d6eZ"Gd7d8eZ#Gd9d:eZ$Gd;deZ&Gd?d@eeZGdAdBeeZ'GdCdDeZ(GdEdFe)eZ*GdGdHeZ+GdIdJeZ,GdKdLeZ-dMS)N)absolute_import)IncompleteReadceZdZdZdS) HTTPErrorz#Base exception used by this module.N__name__ __module__ __qualname____doc__4/usr/lib/python3/dist-packages/urllib3/exceptions.pyrrs--Dr rceZdZdZdS) HTTPWarningz!Base warning used by this module.Nrr r rrrs++Dr rceZdZdZdZdZdS) PoolErrorz/Base exception for errors caused within a pool.cT||_t||d|dS)Nz: )poolr__init__)selfrmessages rrzPoolError.__init__s0 4TTT77!;<<<<66$$$$$$$$$r r(ceZdZdZdS) DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrr r rr1r1:EEDr r1ceZdZdZdS) ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr r rr4r4@sHHDr r4ceZdZdZddZdS) 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 Nc`||_d|d|d}t||||dS)NzMax retries exceeded with url: z (Caused by ))reasonrr)rrr"r9rs rrzMaxRetryError.__init__Ws= HKVVVTdD#w77777r r!rr r r rr r rr6r6Ms2888888r r6ceZdZdZddZdS)HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.cXd|z}t||||||_dS)Nz)Tried to open a foreign host with url: %s)rrretries)rrr"r?rs rrzHostChangedError.__init__bs1=CdD#w777 r N)r=r:r r rr<r<_s.IIr r<ceZdZdZdS)TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNrr r rrArAhs;;Dr rAceZdZdZdS) TimeoutErrorzRaised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nrr r rrCrCns  Dr rCceZdZdZdS)ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr r rrErExsPPDr rEceZdZdZdS)ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr r rrGrGsJJDr rGceZdZdZdS)NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r rrIrIsRRDr rIceZdZdZdS)EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r rrKrKMMDr rKceZdZdZdS)ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r rrNrNrLr rNceZdZdZdS)LocationValueErrorz<<r rVceZdZdZdZdZdS) ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)rr r r GENERIC_ERRORSPECIFIC_ERRORr r rr[r[sNN.M=NNNr r[ceZdZdZdS)SecurityWarningz0Warned when performing security reducing actionsNrr r rr_r_::Dr r_ceZdZdZdS)SubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.Nrr r rrbrbsLLDr rbceZdZdZdS)InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrr r rrdrds99Dr rdceZdZdZdS)SystemTimeWarningz0Warned when system time is suspected to be wrongNrr r rrfrfr`r rfceZdZdZdS)InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrr r rrhrhsSSDr rhceZdZdZdS)SNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nrr r rrjrjr&r rjceZdZdZdS)DependencyWarningzc Warned when an attempt is made to import a module with missing optional dependencies. Nrr r rrlrl  Dr rlceZdZdZdS)ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrr r rroror2r roceZdZdZdS)BodyNotHttplibCompatiblez Body should be :class:`http.client.HTTPResponse` like (have an fp attribute which returns raw chunks) for read_chunked(). Nrr r rrqrqrmr rqc(eZdZdZfdZdZxZS)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. cZtt|||dSr!)r*rr)rpartialexpectedrs rrzIncompleteRead.__init__s) nd##,,Wh?????r c$d|j|jfzS)Nz/IncompleteRead(%i bytes read, %i more expected))rtrurs r__repr__zIncompleteRead.__repr__s@ L MD   r rr r r rrwr/rs@rrrsV@@@@@       r rc(eZdZdZfdZdZxZS)InvalidChunkLengthz+Invalid chunk length in a chunked response.ctt|||j||_||_dSr!)r*rzrtelllength_remainingresponselength)rr~rrs rrzInvalidChunkLength.__init__ sJ  $''00 MMOOX6   !  r c$d|j|jfzS)Nz0InvalidChunkLength(got length %r, %i bytes read))rrtrs rrwzInvalidChunkLength.__repr__sA K LE   r rxrs@rrzrzsM55       r rzceZdZdZdS) InvalidHeaderz(The header provided was somehow invalid.Nrr r rrrs22Dr rc"eZdZdZfdZxZS)ProxySchemeUnknownz1ProxyManager does not support the supplied schemec||dkrd}|d}nd|z}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*rrrYs rrzProxySchemeUnknown.__init__#s[ [ F >VGGV   $''0099999r r.rs@rrrs>;; : : : : : : : : :r rceZdZdZdS)ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrr r rrr2sGGDr rc"eZdZdZfdZxZS)HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.cj|pdd|}tt||dS)NUnknownz, unparsed data: )r*rr)rdefects unparsed_datarrs rrzHeaderParsingError.__init__;s?-4-A -A-A==Q  $''0099999r r.rs@rrr8s>XX:::::::::r rceZdZdZdS)UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr r rrr@r&r rN). __future__rsix.moves.http_clientrhttplib_IncompleteRead ExceptionrWarningrrrr%r(r1r4ConnectionErrorr6r<rArCrErGrIrKrN ValueErrorrPrRrVr[r_rbrdrfrhrjrlrorqrzrAssertionErrorrrrrr r rrs`&&&&&&JJJJJJ              '   , , , , , , , , 6 6 6 6 69 6 6 6     y   $$$$$$$$     )        I     88888L888$|             9        |\        ,        ,i        Y        i        Y   !!!!!+!!!)>>>>>I>>>     k        O        _                o                                 y        Y 6   $     $:   "     I   :::::)9:::(     Z   ::::::::     I     r