HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/urllib3/__pycache__/exceptions.cpython-310.pyc
o

;j�&�@sddlmZddlZddlZddlZddlmZddlmZ	ej
r9ddlmZddl
mZddlmZdd	lmZGd
d�de�ZGdd
�d
e�ZeejdefeedffZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z e Z!Gdd�de�Z"Gdd�de�Z#Gdd �d e�Z$Gd!d"�d"e�Z%Gd#d$�d$e%e�Z&Gd%d&�d&e%�Z'Gd'd(�d(e'e�Z(Gd)d*�d*e(�Z)Gd+d,�d,e�Z*Gd-d.�d.e�Z+Gd/d0�d0e�Z,Gd1d2�d2e-e�Z.Gd3d4�d4e.�Z/Gd5d6�d6e.�Z0Gd7d8�d8e�Z1Gd9d:�d:e�Z2Gd;d<�d<e2�Z3Gd=d>�d>e2�Z4Gd?d@�d@e2�Z5GdAdB�dBe2�Z6GdCdD�dDe�Z7GdEdF�dFe e-�Z8GdGdH�dHe�Z9GdIdJ�dJee	�ZGdKdL�dLee	�Z:GdMdN�dNe�Z;GdOdP�dPe<e0�Z=GdQdR�dRe-�Z>GdSdT�dTe�Z?GdUdV�dVe�Z@dS)W�)�annotationsN)�
MessageDefect)�IncompleteRead�)�HTTPConnection)�ConnectionPool)�HTTPResponse)�Retryc@�eZdZdZdS)�	HTTPErrorz#Base exception used by this module.N��__name__�
__module__�__qualname__�__doc__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/urllib3/exceptions.pyr�rc@r
)�HTTPWarningz!Base warning used by this module.Nrrrrrrrr.cs,eZdZdZd
�fdd	�Zddd�Z�ZS)�	PoolErrorz/Base exception for errors caused within a pool.�poolr�message�str�return�Nonec�&||_||_t��|�d|���dS�Nz: )r�_message�super�__init__)�selfrr��	__class__rrr �zPoolError.__init__�_TYPE_REDUCE_RESULTcC�|jd|jffS�N�r"r�r rrr�
__reduce__%�zPoolError.__reduce__)rrrrrr�rr$�r
rrrrr)�
__classcell__rrr!rrsrcs,eZdZdZd�fd
d�Zdd
d�Z�ZS)�RequestErrorz8Base exception for PoolErrors that have associated URLs.rr�url�
str | Nonerrrrcs||_t��||�dSr&)r/rr)r rr/rr!rrr-szRequestError.__init__r$cC�|jd|j|jffSr&)r"r/rr(rrrr)1�zRequestError.__reduce__)rrr/r0rrrrr+r,rrr!rr.*sr.c@r
)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrrrrrr36rr3cs,eZdZUdZded<d�fd	d
�Z�ZS)�
ProxyErrorz,Raised when the connection to a proxy fails.�	Exception�original_errorrr�errorrrcst��||�||_dSr&)rrr6)r rr7r!rrr@s
zProxyError.__init__)rrr7r5rr)r
rrr�__annotations__rr-rrr!rr4:s
r4c@r
)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrrrrrr9Err9c@r
)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrrrrrr:Irr:cs0eZdZdZ	dd�fdd�
Zddd�Z�ZS)�
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/r0�reason�Exception | Nonerrcs,||_d|�d|�d�}t��|||�dS)NzMax retries exceeded with url: z (Caused by �))r<rr)r rr/r<rr!rrr_szMaxRetryError.__init__r$cCr1r&)r"r/r<r(rrrr)hr2zMaxRetryError.__reduce__r&)rrr/r0r<r=rrr+r,rrr!rr;Ts
�	r;cs&eZdZdZ	d
d�fdd�
Z�ZS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.�rrr/r�retries�Retry | intrrcs$d|��}t��|||�||_dS)Nz'Tried to open a foreign host with url: )rrrA)r rr/rArr!rrrps

zHostChangedError.__init__)r@)rrr/rrArBrr�r
rrrrr-rrr!rr?ms�r?c@r
)�TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNrrrrrrDxrrDc@r
)�TimeoutErrorz�Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    NrrrrrrE|rrEc@r
)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrrrrrrF�rrFc@r
)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrrrrrrG�rrGcs:eZdZdZd�fdd	�Zddd�Zedd
d��Z�ZS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.�connrrrrrcrr)rIrrr)r rIrr!rrr�r#zNewConnectionError.__init__r$cCr%r&r'r(rrrr)�r*zNewConnectionError.__reduce__cCstjdtdd�|jS)NzZThe 'pool' property is deprecated and will be removed in urllib3 v3.0. Use 'conn' instead.�)�
stacklevel)�warnings�warn�
FutureWarningrIr(rrrr�s�zNewConnectionError.pool)rIrrrrrr+)rr)	r
rrrrr)�propertyrr-rrr!rrH�s
rHcs,eZdZdZd�fdd	�Zddd
�Z�ZS)�NameResolutionErrorz'Raised when host name resolution fails.�hostrrIrr<�socket.gaierrorcs0d|�d|�d�}||_||_t��||�dS)NzFailed to resolve 'z' (r>)�_host�_reasonrr)r rQrIr<rr!rrr�szNameResolutionError.__init__rr$cCs|j|jd|jffSr&)r"rSrTr(rrrr)�r2zNameResolutionError.__reduce__)rQrrIrr<rRr+r,rrr!rrP�srPc@r
)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.NrrrrrrU�rrUc@r
)�
FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.NrrrrrrV�rrVc@r
)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.NrrrrrrW�rrWc@r
)�LocationValueErrorz<Raised when there is something wrong with a given URL input.NrrrrrrX�rrXc�"eZdZdZd�fdd�Z�ZS)	�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.�locationrrrc� d|��}t��|�||_dS)NzFailed to parse: )rrr[)r r[rr!rrr��

zLocationParseError.__init__)r[rrrrCrrr!rrZ��rZcs"eZdZdZd�fdd�Z�ZS)�URLSchemeUnknownz2Raised when a URL input has an unsupported scheme.�schemercr\)NzNot supported URL scheme )rrr`�r r`rr!rrr�r]zURLSchemeUnknown.__init__)r`rrCrrr!rr_�r^r_c@seZdZdZdZdZdS)�
ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)r
rrrZ
GENERIC_ERRORZSPECIFIC_ERRORrrrrrb�srbc@r
)�SecurityWarningz0Warned when performing security reducing actionsNrrrrrrc�rrcc@r
)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrrrrrrd�rrdc@r
)�NotOpenSSLWarningz)Warned when using unsupported SSL libraryNrrrrrre�rrec@r
)�SystemTimeWarningz0Warned when system time is suspected to be wrongNrrrrrrf�rrfc@r
)�InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrrrrrrg�rrgc@r
)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    Nrrrrrrh�rrhc@r
)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrrrrrri�rric@r
)�BodyNotHttplibCompatiblez�
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    Nrrrrrrj�rrjc@s6eZdZUdZded<ded<d
dd�Zdd
d�ZdS)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.
    �int�partial�expectedrrcCs||_||_dSr&�rlrm)r rlrmrrrrs
zIncompleteRead.__init__rcC�d|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected)rnr(rrr�__repr__��zIncompleteRead.__repr__N)rlrkrmrkrr�rr)r
rrrr8rrprrrrrs

rc@s$eZdZdZddd	�Zddd�Zd
S)�InvalidChunkLengthz+Invalid chunk length in a chunked response.�responser�length�bytesrrcCs"|��|_|j|_||_||_dSr&)�tellrlZlength_remainingrmrtru)r rtrurrrrs

zInvalidChunkLength.__init__rcCro)Nz0InvalidChunkLength(got length %r, %i bytes read))rurlr(rrrrp$rqzInvalidChunkLength.__repr__N)rtrrurvrrrr)r
rrrrrprrrrrss
rsc@r
)�
InvalidHeaderz(The header provided was somehow invalid.Nrrrrrrx+rrxcrY)	�ProxySchemeUnknownz1ProxyManager does not support the supplied schemer`r0rrcs6|dkrd}|dur
d}nd|�d�}t��|�dS)NZ	localhostz>Proxy URL had no scheme, should start with http:// or https://z!Proxy URL had unsupported scheme z , should use http:// or https://�rrrar!rrr4szProxySchemeUnknown.__init__)r`r0rrrCrrr!rry/sryc@r
)�ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrrrrrr{@rr{cs"eZdZdZd
�fdd	�Z�ZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.�defects�list[MessageDefect]�
unparsed_data�bytes | str | Nonerrcs"|pd�d|��}t��|�dS)NZUnknownz, unparsed data: rz)r r}rrr!rrrGszHeaderParsingError.__init__)r}r~rr�rrrCrrr!rr|Dr^r|c@r
)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrrrrrr�Nrr�)A�
__future__r�socket�typingrLZemail.errorsr�http.clientrZhttplib_IncompleteRead�
TYPE_CHECKING�
connectionrZconnectionpoolrrtrZ
util.retryr	r5r�Warningr�tuple�Callable�objectr$rr.r3r4r9r:�ConnectionErrorr;r?rDrErFrGrHrPrUrVrW�
ValueErrorrXrZr_rbrcrdrerfrgrhrirjrsrx�AssertionErrorryr{r|r�rrrr�<module>sf