HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib/python3.10/site-packages/urllib3/__pycache__/exceptions.cpython-310.pyc
o

��h�&�@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�H/usr/local/CyberPanel/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�urlrrrrcs||_t��||�dSr&)r/rr)r rr/rr!rrr-szRequestError.__init__r$cC�|jd|j|jffSr&)r"r/rr(rrrr)1�zRequestError.__reduce__)rrr/rrrrrr+r,rrr!rr.*sr.c@r
)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nrrrrrr26rr2cs,eZdZUdZded<d�fd	d
�Z�ZS)�
ProxyErrorz,Raised when the connection to a proxy fails.�	Exception�original_errorrr�errorrrcst��||�||_dSr&)rrr5)r rr6r!rrr@s
zProxyError.__init__)rrr6r4rr)r
rrr�__annotations__rr-rrr!rr3:s
r3c@r
)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nrrrrrr8Err8c@r
)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nrrrrrr9Irr9cs0eZdZdZ	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/r�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$cCr0r&)r"r/r;r(rrrr)hr1zMaxRetryError.__reduce__r&)rrr/rr;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: )rrr@)r rr/r@rr!rrrps

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

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    NrrrrrrD|rrDc@r
)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNrrrrrrE�rrEc@r
)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNrrrrrrF�rrFcs:eZdZdZd�fdd	�Zddd�Zedd
d��Z�ZS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.�connrrrrrcrr)rHrrr)r rHrr!rrr�r#zNewConnectionError.__init__r$cCr%r&r'r(rrrr)�r*zNewConnectionError.__reduce__cCstjdtdd�|jS)Nz\The 'pool' property is deprecated and will be removed in urllib3 v2.1.0. Use 'conn' instead.�)�
stacklevel)�warnings�warn�DeprecationWarningrHr(rrrr�s�zNewConnectionError.pool)rHrrrrrr+)rr)	r
rrrrr)�propertyrr-rrr!rrG�s
rGcs,eZdZdZd�fdd	�Zddd
�Z�ZS)�NameResolutionErrorz'Raised when host name resolution fails.�hostrrHrr;�socket.gaierrorcs0d|�d|�d�}||_||_t��||�dS)NzFailed to resolve 'z' (r=)�_host�_reasonrr)r rPrHr;rr!rrr�szNameResolutionError.__init__rr$cCs|j|jd|jffSr&)r"rRrSr(rrrr)�r1zNameResolutionError.__reduce__)rPrrHrr;rQr+r,rrr!rrO�srOc@r
)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.NrrrrrrT�rrTc@r
)�
FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.NrrrrrrU�rrUc@r
)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.NrrrrrrV�rrVc@r
)�LocationValueErrorz<Raised when there is something wrong with a given URL input.NrrrrrrW�rrWc�"eZdZdZd�fdd�Z�ZS)	�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.�locationrrrc� d|��}t��|�||_dS)NzFailed to parse: )rrrZ)r rZrr!rrr��

zLocationParseError.__init__)rZrrrrBrrr!rrY��rYcs"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_rrBrrr!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
rrr�
GENERIC_ERROR�SPECIFIC_ERRORrrrrra�srac@r
)�SecurityWarningz0Warned when performing security reducing actionsNrrrrrrd�rrdc@r
)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nrrrrrre�rrec@r
)�NotOpenSSLWarningz)Warned when using unsupported SSL libraryNrrrrrrf�rrfc@r
)�SystemTimeWarningz0Warned when system time is suspected to be wrongNrrrrrrg�rrgc@r
)�InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nrrrrrrh�rrhc@r
)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    Nrrrrrri�rric@r
)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nrrrrrrj�rrjc@r
)�BodyNotHttplibCompatiblez�
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    Nrrrrrrk�rrkc@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&�rmrn)r rmrnrrrrs
zIncompleteRead.__init__rcC�d|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected)ror(rrr�__repr__��zIncompleteRead.__repr__N)rmrlrnrlrr�rr)r
rrrr7rrqrrrrrs

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

zInvalidChunkLength.__init__rcCrp)Nz0InvalidChunkLength(got length %r, %i bytes read))rvrmr(rrrrq$rrzInvalidChunkLength.__repr__N)rurrvrwrrrs)r
rrrrrqrrrrrts
rtc@r
)�
InvalidHeaderz(The header provided was somehow invalid.Nrrrrrrz+rrzcrX)	�ProxySchemeUnknownz1ProxyManager does not support the supplied schemer_�
str | Nonerrcs6|dkrd}|dur
d}nd|�d�}t��|�dS)N�	localhostz>Proxy URL had no scheme, should start with http:// or https://z!Proxy URL had unsupported scheme z , should use http:// or https://�rrr`r!rrr4szProxySchemeUnknown.__init__)r_r|rrrBrrr!rr{/sr{c@r
)�ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNrrrrrr@rrcs"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)N�Unknownz, unparsed data: r~)r r�r�rr!rrrGszHeaderParsingError.__init__)r�r�r�r�rrrBrrr!rr�Dr]r�c@r
)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNrrrrrr�Nrr�)A�
__future__r�socket�typingrK�email.errorsr�http.clientr�httplib_IncompleteRead�
TYPE_CHECKING�
connectionr�connectionpoolrrur�
util.retryr	r4r�Warningr�tuple�Callable�objectr$rr.r2r3r8r9�ConnectionErrorr:r>rCrDrErFrGrOrTrUrV�
ValueErrorrWrYr^rardrerfrgrhrirjrkrtrz�AssertionErrorr{rr�r�rrrr�<module>sf