HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/site-packages/urllib3/__pycache__/exceptions.cpython-37.pyc
B

���g�$�@s
ddlmZddlZddlZddlZddlmZddlmZ	ej
rrddlmZddl
mZddlmZdd	lmZGd
d�de�ZGdd
�d
e�ZejejdefejedffZGdd�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@seZdZdZdS)�	HTTPErrorz#Base exception used by this module.N)�__name__�
__module__�__qualname__�__doc__�rr�</usr/local/lib/python3.7/site-packages/urllib3/exceptions.pyr
sr
c@seZdZdZdS)�HTTPWarningz!Base warning used by this module.N)rrr
rrrrrrsr.cs8eZdZdZdddd��fdd�Zdd	�d
d�Z�ZS)�	PoolErrorz/Base exception for errors caused within a pool.r�str�None)�pool�message�returncs ||_t��|�d|���dS)Nz: )r�super�__init__)�selfrr)�	__class__rrr"szPoolError.__init__�_TYPE_REDUCE_RESULT)rcCs
|jdfS)N)NN)r)rrrr�
__reduce__&szPoolError.__reduce__)rrr
rrr�
__classcell__rr)rrrsrcs:eZdZdZddddd��fdd�Zdd	�d
d�Z�ZS)�RequestErrorz8Base exception for PoolErrors that have associated URLs.rrr)r�urlrrcs||_t��||�dS)N)r rr)rrr r)rrrr.szRequestError.__init__r)rcCs|jd|jdffS)N)rr )rrrrr2szRequestError.__reduce__)rrr
rrrrrr)rrr+src@seZdZdZdS)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.N)rrr
rrrrrr!7sr!cs4eZdZUdZded<dddd��fdd�Z�ZS)	�
ProxyErrorz,Raised when the connection to a proxy fails.�	Exception�original_errorrr)r�errorrcst��||�||_dS)N)rrr$)rrr%)rrrrAszProxyError.__init__)rrr
r�__annotations__rrrr)rrr";s
r"c@seZdZdZdS)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.N)rrr
rrrrrr'Fsr'c@seZdZdZdS)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.N)rrr
rrrrrr(Jsr(cs.eZdZdZd
ddddd��fdd	�
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`

    NrrzException | Noner)rr �reasonrcs,||_d|�d|�d�}t��|||�dS)NzMax retries exceeded with url: z (Caused by �))r*rr)rrr r*r)rrrr`szMaxRetryError.__init__)N)rrr
rrrrr)rrr)Us	r)cs.eZdZdZd
ddddd��fdd	�
Z�ZS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.�rrzRetry | intr)rr �retriesrcs$d|��}t��|||�||_dS)Nz'Tried to open a foreign host with url: )rrr.)rrr r.r)rrrrms
zHostChangedError.__init__)r-)rrr
rrrrr)rrr,jsr,c@seZdZdZdS)�TimeoutStateErrorz1Raised when passing an invalid state to a timeoutN)rrr
rrrrrr/usr/c@seZdZdZdS)�TimeoutErrorz�Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    N)rrr
rrrrrr0ysr0c@seZdZdZdS)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverN)rrr
rrrrrr1�sr1c@seZdZdZdS)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverN)rrr
rrrrrr2�sr2cs<eZdZdZdddd��fdd�Zedd�d	d
��Z�ZS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.rrr)�connrrcs ||_t��|�d|���dS)Nz: )r4rr)rr4r)rrrr�szNewConnectionError.__init__)rcCstjdtdd�|jS)Nz\The 'pool' property is deprecated and will be removed in urllib3 v2.1.0. Use 'conn' instead.�)�
stacklevel)�warnings�warn�DeprecationWarningr4)rrrrr�s
zNewConnectionError.pool)rrr
rr�propertyrrrr)rrr3�sr3cs*eZdZdZdddd��fdd�Z�ZS)�NameResolutionErrorz'Raised when host name resolution fails.rrzsocket.gaierror)�hostr4r*cs$d|�d|�d�}t��||�dS)NzFailed to resolve 'z' (r+)rr)rr<r4r*r)rrrr�szNameResolutionError.__init__)rrr
rrrrr)rrr;�sr;c@seZdZdZdS)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.N)rrr
rrrrrr=�sr=c@seZdZdZdS)�
FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.N)rrr
rrrrrr>�sr>c@seZdZdZdS)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.N)rrr
rrrrrr?�sr?c@seZdZdZdS)�LocationValueErrorz<Raised when there is something wrong with a given URL input.N)rrr
rrrrrr@�sr@cs(eZdZdZddd��fdd�Z�ZS)�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.rr)�locationrcs d|��}t��|�||_dS)NzFailed to parse: )rrrB)rrBr)rrrr�s
zLocationParseError.__init__)rrr
rrrrr)rrrA�srAcs&eZdZdZdd��fdd�Z�ZS)�URLSchemeUnknownz2Raised when a URL input has an unsupported scheme.r)�schemecs d|��}t��|�||_dS)NzNot supported URL scheme )rrrD)rrDr)rrrr�s
zURLSchemeUnknown.__init__)rrr
rrrrr)rrrC�srCc@seZdZdZdZdZdS)�
ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)rrr
r�
GENERIC_ERROR�SPECIFIC_ERRORrrrrrE�srEc@seZdZdZdS)�SecurityWarningz0Warned when performing security reducing actionsN)rrr
rrrrrrH�srHc@seZdZdZdS)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.N)rrr
rrrrrrI�srIc@seZdZdZdS)�NotOpenSSLWarningz)Warned when using unsupported SSL libraryN)rrr
rrrrrrJ�srJc@seZdZdZdS)�SystemTimeWarningz0Warned when system time is suspected to be wrongN)rrr
rrrrrrK�srKc@seZdZdZdS)�InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.N)rrr
rrrrrrL�srLc@seZdZdZdS)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    N)rrr
rrrrrrM�srMc@seZdZdZdS)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.N)rrr
rrrrrrN�srNc@seZdZdZdS)�BodyNotHttplibCompatiblez�
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    N)rrr
rrrrrrO�srOc@s0eZdZdZdddd�dd�Zdd�d	d
�ZdS)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.
    �intr)�partial�expectedrcCs||_||_dS)N)rQrR)rrQrRrrrr�szIncompleteRead.__init__r)rcCsd|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected))rQrR)rrrr�__repr__szIncompleteRead.__repr__N)rrr
rrrSrrrrr�src@s0eZdZdZdddd�dd�Zdd	�d
d�ZdS)
�InvalidChunkLengthz+Invalid chunk length in a chunked response.r�bytesr)�response�lengthrcCs"|��|_|j|_||_||_dS)N)�tellrQ�length_remainingrRrVrW)rrVrWrrrr
s
zInvalidChunkLength.__init__r)rcCsd|j|jfS)Nz0InvalidChunkLength(got length %r, %i bytes read))rWrQ)rrrrrSszInvalidChunkLength.__repr__N)rrr
rrrSrrrrrT
srTc@seZdZdZdS)�
InvalidHeaderz(The header provided was somehow invalid.N)rrr
rrrrrrZsrZcs(eZdZdZddd��fdd�Z�ZS)�ProxySchemeUnknownz1ProxyManager does not support the supplied schemez
str | Noner)rDrcs6|dkrd}|dkrd}nd|�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://)rr)rrDr)rrrr#szProxySchemeUnknown.__init__)rrr
rrrrr)rrr[sr[c@seZdZdZdS)�ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedN)rrr
rrrrrr]/sr]cs*eZdZdZdddd��fdd�Z�ZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.zlist[MessageDefect]zbytes | str | Noner)�defects�
unparsed_datarcs"|pd�d|��}t��|�dS)N�Unknownz, unparsed data: )rr)rr_r`r)rrrr6szHeaderParsingError.__init__)rrr
rrrrr)rrr^3sr^c@seZdZdZdS)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyN)rrr
rrrrrrb=srb)A�
__future__r�socket�typingr7Zemail.errorsr�http.clientr�httplib_IncompleteRead�
TYPE_CHECKING�
connectionr�connectionpoolrrVrZ
util.retryr	r#r
�Warningr�Tuple�Callable�objectrrrr!r"r'r(�ConnectionErrorr)r,r/r0r1r2r3r;r=r>r?�
ValueErrorr@rArCrErHrIrJrKrLrMrNrOrTrZ�AssertionErrorr[r]r^rbrrrr�<module>sf