bg$ ddlmZddlZddlZddlZddlmZddlmZ ej rddl m Z ddl mZddlmZdd lmZGd d eZGd d eZejejdefejedffZGddeZGddeZGddeZGddeZGddeZGddeZ e Z!GddeZ"GddeZ#Gdd eZ$Gd!d"eZ%Gd#d$e%eZ&Gd%d&e%Z'Gd'd(e'eZ(Gd)d*e(Z)Gd+d,eZ*Gd-d.eZ+Gd/d0eZ,Gd1d2e-eZ.Gd3d4e.Z/Gd5d6e.Z0Gd7d8eZ1Gd9d:eZ2Gd;de2Z4Gd?d@e2Z5GdAdBe2Z6GdCdDeZ7GdEdFe e-Z8GdGdHeZ9GdIdJee ZGdKdLee Z:GdMdNeZ;GdOdPeGdSdTeZ?GdUdVeZ@dS)W) annotationsN) MessageDefect)IncompleteRead)HTTPConnection)ConnectionPool) HTTPResponse)RetryceZdZdZdS) HTTPErrorz#Base exception used by this module.N__name__ __module__ __qualname____doc__I/opt/cloudlinux/venv/lib64/python3.11/site-packages/urllib3/exceptions.pyr r s----rr ceZdZdZdS) HTTPWarningz!Base warning used by this module.Nr rrrrrs++++rr.c,eZdZdZd fd Zd d ZxZS) PoolErrorz/Base exception for errors caused within a pool.poolrmessagestrreturnNonecb||_t|d|dSNz: )rsuper__init__)selfrr __class__s rr!zPoolError.__init__"6  D--G--.....r_TYPE_REDUCE_RESULTc|jdfS)N)NNr#r"s r __reduce__zPoolError.__reduce__&s~|++r)rrrrrrrr%rrrrr!r) __classcell__r's@rrrsW99//////,,,,,,,,rrc,eZdZdZd fd Zd d ZxZS) RequestErrorz8Base exception for PoolErrors that have associated URLs.rrurlrrrrcZ||_t||dSN)r/r r!)r"rr/rr#s rr!zRequestError.__init__.s* w'''''rr%c$|jd|jdffSr1)r#r/r(s rr)zRequestError.__reduce__2s~dh555r)rrr/rrrrrr*r+r's@rr.r.+sWBB((((((66666666rr.ceZdZdZdS)SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nr rrrr4r47CCCCrr4c0eZdZUdZded<d fd ZxZS) ProxyErrorz,Raised when the connection to a proxy fails. Exceptionoriginal_errorrrerrorrrcZt||||_dSr1)r r!r9)r"rr:r#s rr!zProxyError.__init__As+ %(((#r)rrr:r8rr)rrrr__annotations__r!r,r's@rr7r7;sS66$$$$$$$$$$rr7ceZdZdZdS) DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nr rrrr>r>FEEEErr>ceZdZdZdS) ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nr rrrrArAJsHHHHrrAc(eZdZdZ d d fd ZxZS) MaxRetryErroraRaised when the maximum number of retries is exceeded. :param pool: The connection pool :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool` :param str url: The requested Url :param reason: The underlying error :type reason: :class:`Exception` Nrrr/rreasonException | Nonerrcn||_d|d|d}t|||dS)NzMax retries exceeded with url: z (Caused by ))rDr r!)r"rr/rDrr#s rr!zMaxRetryError.__init__`sF PCPPVPPP sG,,,,,rr1)rrr/rrDrErrrrrrr!r,r's@rrCrCUsSJN-----------rrCc(eZdZdZ d d fd ZxZS)HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.rrr/rretries Retry | intrrcfd|}t|||||_dS)Nz'Tried to open a foreign host with url: )r r!rL)r"rr/rLrr#s rr!zHostChangedError.__init__ms:BCAA sG,,, r)rK)rrr/rrLrMrrrHr's@rrJrJjsOIIFGrrJceZdZdZdS)TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNr rrrrPrPus;;;;rrPceZdZdZdS) TimeoutErrorzRaised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nr rrrrRrRysrrRceZdZdZdS)ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNr rrrrTrTsPPPPrrTceZdZdZdS)ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNr rrrrVrVsJJJJrrVc<eZdZdZd fd Zed d ZxZS) NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.connrrrrrcb||_t|d|dSr)rYr r!)r"rYrr#s rr!zNewConnectionError.__init__r$rcHtjdtd|jS)Nz\The 'pool' property is deprecated and will be removed in urllib3 v2.1.0. Use 'conn' instead.) stacklevel)warningswarnDeprecationWarningrYr(s rrzNewConnectionError.pools0  5      yr)rYrrrrr)rr)rrrrr!propertyrr,r's@rrXrXscRR//////XrrXc$eZdZdZd fd ZxZS) NameResolutionErrorz'Raised when host name resolution fails.hostrrYrrDsocket.gaierrorc^d|d|d}t||dS)NzFailed to resolve 'z' (rGr r!)r"rdrYrDrr#s rr!zNameResolutionError.__init__s;:::::: w'''''r)rdrrYrrDrerHr's@rrcrcsC11((((((((((rrcceZdZdZdS)EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nr rrrririMMMMrriceZdZdZdS) FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.Nr rrrrlrlsQQQQrrlceZdZdZdS)ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nr rrrrnrnrjrrnceZdZdZdS)LocationValueErrorzProxy URL had no scheme, should start with http:// or https://z!Proxy URL had unsupported scheme z , should use http:// or https://rgrys rr!zProxySchemeUnknown.__init__#sO [ F >VGGb&bbbG !!!!!r)rwrrrrHr's@rrrsC;; " " " " " " " " " "rrceZdZdZdS)ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNr rrrrr/sGGGGrrc$eZdZdZd fd ZxZS) HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.defectslist[MessageDefect] unparsed_databytes | str | Nonerrc\|pdd|}t|dS)NUnknownz, unparsed data: rg)r"rrrr#s rr!zHeaderParsingError.__init__6s;) MMMMM !!!!!r)rrrrrrrHr's@rrr3sCXX""""""""""rrceZdZdZdS)UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNr rrrrr=r5rr)A __future__rsockettypingr^ email.errorsr http.clientrhttplib_IncompleteRead TYPE_CHECKING connectionrconnectionpoolrrr util.retryr r8r WarningrTupleCallableobjectr%rr.r4r7r>rAConnectionErrorrCrJrPrRrTrVrXrcrirlrn ValueErrorrprrrvr{rrrrrrrrrrAssertionErrorrrrrrrrrs"""""" &&&&&&@@@@@@ "******......&&&&&&!!!!!! ..... ...,,,,,',,,l OCK &,vs{";; , , , , , , , , 6 6 6 6 69 6 6 6DDDDDyDDD$$$$$$$$FFFFF)FFFIIIIIIIII   -----L---*|<<<<< <<<9QQQQQ|\QQQ KKKKK,KKK,i&(((((,(((NNNNNYNNNRRRRRIRRRNNNNNiNNNGGGGGYGGG!!!!!+!!!)>>>>>I>>>;;;;;k;;;:::::_:::44444444;;;;;;;;TTTTToTTT FFFFF FFFy     Y 6   &      $:    33333I333""""")9""""HHHHHZHHH""""""""DDDDDIDDDDDr