o âÄd ã@s~ddlmZddlmZGdd„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;eƒZ$Gdd?„d?eƒZ&Gd@dA„dAeeƒZGdBdC„dCeeƒZ'GdDdE„dEeƒZ(GdFdG„dGe)eƒZ*GdHdI„dIeƒZ+GdJdK„dKeƒZ,GdLdM„dMeƒZ-dNS)Oé)Úabsolute_importé)ÚIncompleteReadc@óeZdZdZdS)Ú HTTPErrorz#Base exception used by this module.N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©r r úm/private/var/folders/v1/_jykv66s6qd26_69j1njbrl80000gr/T/pip-target-p1gutpg6/lib/python/urllib3/exceptions.pyrórc@r)Ú HTTPWarningz!Base warning used by this module.Nrr r r r rrrc@ó 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__s zPoolError.__reduce__N©rr r r rrr r r r ró rc@r)Ú 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 r rrc@r)ÚSSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrr r r r r,rrcó eZdZdZ‡fdd„Z‡ZS)Ú ProxyErrorz,Raised when the connection to a proxy fails.cs$tt|ƒj||g|¢RŽ||_dSr)Úsuperr!rÚoriginal_error)rrÚerrorÚargsrr r r5s zProxyError.__init__©rr r r rÚ __classcell__r r rr r!2ór!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@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 rWs zMaxRetryError.__init__r©rr r r rr r r r r+Ms r+c@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)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)Ú TimeoutErrorz¿Raised 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 r4€rr4c@r)ÚNewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r r r r5†rr5c@r)ÚEmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r r r r6Œrr6c@r)ÚClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r r r r7’rr7c@r)ÚLocationValueErrorz²sr>c@r)ÚSecurityWarningz0Warned when performing security reducing actionsNrr r r r rA¹rrAc@r)ÚSubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.Nrr r r r rB¿rrBc@r)ÚInsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrr r r r rCÅrrCc@r)ÚSystemTimeWarningz0Warned when system time is suspected to be wrongNrr r r r rDËrrDc@r)ÚInsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrr r r r rEÑrrEc@r)ÚSNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nrr r r r rF×rrFc@r)ÚDependencyWarningzc Warned when an attempt is made to import a module with missing optional dependencies. Nrr r r r rGÝórGc@r)ÚResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrr r r r rIærrIc@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 rJìrHrJcó(eZdZdZ‡fdd„Zdd„Z‡ZS)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)rÚpartialÚexpectedrr r rýszIncompleteRead.__init__cCód|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected))rLrMrr r r Ú__repr__óþzIncompleteRead.__repr__©rr r r rrOr'r r rr rõs rcrK)ÚInvalidChunkLengthz+Invalid chunk length in a chunked response.cs(tt|ƒ | ¡|j¡||_||_dSr)r"rRrÚtellÚlength_remainingÚresponseÚlength)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#sÿÿzProxySchemeUnknown.__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: %rÚUnknown)r"r[r)rÚdefectsÚ 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_clientrÚhttplib_IncompleteReadÚ ExceptionrÚWarningrrrrr!r)r*ÚConnectionErrorr+r.r1r2r3r4r5r6r7Ú ValueErrorr8r9r;r>rArBrCrDrErFrGrIrJrRrWÚAssertionErrorrXrZr[r_r r r r ÚsP