U a @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@seZdZdZdS) HTTPErrorz#Base exception used by this module.N__name__ __module__ __qualname____doc__r r /Users/jalaguru/Documents/Proserv/artifacts/aws_dms_cdk_automation/aws-dms-cdk-automation/venv/lib/python3.8/site-packages/urllib3/exceptions.pyrsrc@seZdZdZdS) HTTPWarningz!Base warning used by this module.Nrr r r r r sr c@s 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__szPoolError.__reduce__Nrrr r rrr r r r rsrc@s eZdZdZddZddZdS) 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 src@seZdZdZdS)SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrr r r r r,srcs eZdZdZfddZZS) ProxyErrorz,Raised when the connection to a proxy fails.cs"tt|j||f|||_dSr)superrroriginal_error)rrerrorargsrr r r5szProxyError.__init__rrr r r __classcell__r r rr r2src@seZdZdZdS) DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrr r r r r#:sr#c@seZdZdZdS) ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrr r r r r$@sr$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__)Nrrr 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)rrrr*rr r r rbszHostChangedError.__init__N)r)r'r r r r r(_sr(c@seZdZdZdS)TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNrr r r r r+hsr+c@seZdZdZdS) TimeoutErrorzRaised when a socket timeout error occurs. Catching this error will catch both :exc:`ReadTimeoutErrors ` and :exc:`ConnectTimeoutErrors `. Nrr r r r r,nsr,c@seZdZdZdS)ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrr r r r r-xsr-c@seZdZdZdS)ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrr r r r r.sr.c@seZdZdZdS)NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nrr r r r r/sr/c@seZdZdZdS)EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nrr r r r r0sr0c@seZdZdZdS)ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nrr r r r r1sr1c@seZdZdZdS)LocationValueErrorzsr>c@seZdZdZdS)InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrr r r r r?sr?c@seZdZdZdS)SNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nrr r r r r@sr@c@seZdZdZdS)DependencyWarningzc Warned when an attempt is made to import a module with missing optional dependencies. Nrr r r r rAsrAc@seZdZdZdS)ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrr r r r rBsrBc@seZdZdZdS)BodyNotHttplibCompatiblez Body should be :class:`http.client.HTTPResponse` like (have an fp attribute which returns raw chunks) for read_chunked(). Nrr r r r rCsrCcs(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)rrr)rpartialexpectedrr r rszIncompleteRead.__init__cCsd|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected))rDrErr r r __repr__szIncompleteRead.__repr__rrr r rrFr"r r rr rs rcs(eZdZdZfddZddZZS)InvalidChunkLengthz+Invalid chunk length in a chunked response.cs(tt|||j||_||_dSr)rrHrtelllength_remainingresponselength)rrKrLrr r r s  zInvalidChunkLength.__init__cCsd|j|jfS)Nz0InvalidChunkLength(got length %r, %i bytes read))rLrDrr r r rFszInvalidChunkLength.__repr__rGr r rr rHs rHc@seZdZdZdS) InvalidHeaderz(The header provided was somehow invalid.Nrr r r r rMsrMcs eZdZdZfddZZS)ProxySchemeUnknownz1ProxyManager does not support the supplied schemecs6|dkr d}|dkrd}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://)rrNrr7rr r r#szProxySchemeUnknown.__init__r!r r rr rNsrNc@seZdZdZdS)ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrr r r r rP2srPcs eZdZdZfddZZS)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)rrQr)rdefects unparsed_datarrr r r;szHeaderParsingError.__init__r!r r rr rQ8srQc@seZdZdZdS)UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrr r r r rU@srUN). __future__rZpackages.six.moves.http_clientrhttplib_IncompleteRead ExceptionrWarningr rrrrr#r$ConnectionErrorr%r(r+r,r-r.r/r0r1 ValueErrorr2r3r5r8r;r<r=r>r?r@rArBrCrHrMAssertionErrorrNrPrQrUr r r r sN