o Äg ã@s~ddlmZddlmZGdd„deƒZGdd„deƒZGdd„deƒZ Gd d „d e ƒZ Gd d „d eƒZ Gd d„deƒZ Gdd„deƒZ Gdd„deƒZeZGdd„de ƒZGdd„de ƒZGdd„deƒZGdd„deƒZGdd„dee ƒZGdd„deƒZGdd „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ƒZGd/d0„d0eƒZGd1d2„d2eƒZ Gd3d4„d4eƒZ!Gd5d6„d6eƒZ"Gd7d8„d8eƒZ#Gd9d:„d:eƒZ$Gd;d<„d„d>eƒZ&Gd?d@„d@eeƒZGdAdB„dBeeƒZ'GdCdD„dDeƒZ(GdEdF„dFe)eƒZ*GdGdH„dHeƒZ+GdIdJ„dJeƒZ,GdKdL„dLeƒZ-dMS)Né)Úabsolute_import)ÚIncompleteReadc@óeZdZdZdS)Ú HTTPErrorz#Base exception used by this module.N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©r r ú4/usr/lib/python3/dist-packages/urllib3/exceptions.pyrórc@r)Ú HTTPWarningz!Base warning used by this module.Nrr r r r rr rc@ó 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©rrr 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,r rcó 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__©rrr 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(:r r(c@r)Ú ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr r r r r)@r r)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©rrr 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)rrrr/rr 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 r0hr r0c@r)Ú TimeoutErrorz¿Raised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nrr r r r r1nsr1c@r)ÚReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr r r r r2xr r2c@r)ÚConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr r r r r3€r r3c@r)ÚNewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r r r r4†r r4c@r)ÚEmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r r r r5Œr r5c@r)ÚClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r r r r6’r r6c@r)ÚLocationValueErrorzProxy URL had no scheme, should start with http:// or https://zCProxy URL had unsupported scheme %s, should use http:// or https://)r!rWrr<rr r r#sÿÿzProxySchemeUnknown.__init__r%r r rr rWsrWc@r)ÚProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrr r r r rY2r rYcr)Ú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!rZr)rÚdefectsÚ unparsed_datarrr r r;szHeaderParsingError.__init__r%r r rr rZ8r'rZc@r)ÚUnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr r r r r^@r r^N).Ú __future__rÚsix.moves.http_clientrÚhttplib_IncompleteReadÚ ExceptionrÚWarningrrrrr r(r)ÚConnectionErrorr*r-r0r1r2r3r4r5r6Ú ValueErrorr7r8r:r=r@rArBrCrDrErFrHrIrQrVÚAssertionErrorrWrYrZr^r r r r ÚsP