%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core18/current/usr/lib/python3/dist-packages/urllib3/__pycache__/
Upload File :
Create Path :
Current File : //snap/core18/current/usr/lib/python3/dist-packages/urllib3/__pycache__/exceptions.cpython-36.pyc

3

�;g��@sLddlmZddlmZGdd�de�ZGdd�de�ZGdd�de�Z	Gd	d
�d
e	�Z
Gdd�de�ZGd
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:ee�Z$Gd;d<�d<e�Z%Gd=d>�d>ee�ZGd?d@�d@e�Z&GdAdB�dBe'e�Z(GdCdD�dDe�Z)GdEdF�dFe�Z*dGS)H�)�absolute_import)�IncompleteReadc@seZdZdZdS)�	HTTPErrorz#Base exception used by this module.N)�__name__�
__module__�__qualname__�__doc__�r	r	�4/usr/lib/python3/dist-packages/urllib3/exceptions.pyrsrc@seZdZdZdS)�HTTPWarningz!Base warning used by this module.N)rrrrr	r	r	r
r
src@s eZdZdZdd�Zdd�ZdS)�	PoolErrorz/Base exception for errors caused within a pool.cCs||_tj|d||f�dS)Nz%s: %s)�poolr�__init__)�selfr
�messager	r	r
rszPoolError.__init__cCs
|jdfS)N)NN)�	__class__)rr	r	r
�
__reduce__szPoolError.__reduce__N)rrrrrrr	r	r	r
rsrc@s eZdZdZdd�Zdd�ZdS)�RequestErrorz8Base exception for PoolErrors that have associated URLs.cCs||_tj|||�dS)N)�urlrr)rr
rrr	r	r
rszRequestError.__init__cCs|jd|jdffS)N)rr)rr	r	r
r#szRequestError.__reduce__N)rrrrrrr	r	r	r
rsrc@seZdZdZdS)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.N)rrrrr	r	r	r
r(src@seZdZdZdS)�
ProxyErrorz,Raised when the connection to a proxy fails.N)rrrrr	r	r	r
r-src@seZdZdZdS)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.N)rrrrr	r	r	r
r2src@seZdZdZdS)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.N)rrrrr	r	r	r
r7src@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}tj||||�dS)Nz0Max retries exceeded with url: %s (Caused by %r))�reasonrr)rr
rrrr	r	r
rLs
zMaxRetryError.__init__)N)rrrrrr	r	r	r
rBsrc@seZdZdZddd�ZdS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.�cCs"d|}tj||||�||_dS)Nz)Tried to open a foreign host with url: %s)rr�retries)rr
rrrr	r	r
rXszHostChangedError.__init__N)r)rrrrrr	r	r	r
rUsrc@seZdZdZdS)�TimeoutStateErrorz3 Raised when passing an invalid state to a timeout N)rrrrr	r	r	r
r^src@seZdZdZdS)�TimeoutErrorz� Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    N)rrrrr	r	r	r
rcsrc@seZdZdZdS)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverN)rrrrr	r	r	r
r lsr c@seZdZdZdS)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverN)rrrrr	r	r	r
r!ssr!c@seZdZdZdS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.N)rrrrr	r	r	r
r"xsr"c@seZdZdZdS)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.N)rrrrr	r	r	r
r#}sr#c@seZdZdZdS)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.N)rrrrr	r	r	r
r$�sr$c@seZdZdZdS)�LocationValueErrorz<Raised when there is something wrong with a given URL input.N)rrrrr	r	r	r
r%�sr%c@seZdZdZdd�ZdS)�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.cCsd|}tj||�||_dS)NzFailed to parse: %s)rr�location)rr'rr	r	r
r�szLocationParseError.__init__N)rrrrrr	r	r	r
r&�sr&c@seZdZdZdZdZdS)�
ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)rrrrZ
GENERIC_ERRORZSPECIFIC_ERRORr	r	r	r
r(�sr(c@seZdZdZdS)�SecurityWarningz/Warned when perfoming security reducing actionsN)rrrrr	r	r	r
r)�sr)c@seZdZdZdS)�SubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.N)rrrrr	r	r	r
r*�sr*c@seZdZdZdS)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.N)rrrrr	r	r	r
r+�sr+c@seZdZdZdS)�SystemTimeWarningz0Warned when system time is suspected to be wrongN)rrrrr	r	r	r
r,�sr,c@seZdZdZdS)�InsecurePlatformWarningzEWarned when certain SSL configuration is not available on a platform.N)rrrrr	r	r	r
r-�sr-c@seZdZdZdS)�SNIMissingWarningz9Warned when making a HTTPS request without SNI available.N)rrrrr	r	r	r
r.�sr.c@seZdZdZdS)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    N)rrrrr	r	r	r
r/�sr/c@seZdZdZdS)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.N)rrrrr	r	r	r
r0�sr0c@seZdZdZdS)�BodyNotHttplibCompatiblezz
    Body should be httplib.HTTPResponse like (have an fp attribute which
    returns raw chunks) for read_chunked().
    N)rrrrr	r	r	r
r1�sr1cs(eZdZdZ�fdd�Zdd�Z�ZS)rz�
    Response length doesn't match expected Content-Length

    Subclass of http_client.IncompleteRead to allow int value
    for `partial` to avoid creating large objects on streamed
    reads.
    cstt|�j||�dS)N)�superrr)r�partial�expected)rr	r
r�szIncompleteRead.__init__cCsd|j|jfS)Nz/IncompleteRead(%i bytes read, %i more expected))r3r4)rr	r	r
�__repr__�szIncompleteRead.__repr__)rrrrrr5�
__classcell__r	r	)rr
r�src@seZdZdZdS)�
InvalidHeaderz(The header provided was somehow invalid.N)rrrrr	r	r	r
r7�sr7cs eZdZdZ�fdd�Z�ZS)�ProxySchemeUnknownz1ProxyManager does not support the supplied schemecsd|}tt|�j|�dS)NzNot supported proxy scheme %s)r2r8r)r�schemer)rr	r
r�szProxySchemeUnknown.__init__)rrrrrr6r	r	)rr
r8�sr8cs eZdZdZ�fdd�Z�ZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.cs$d|pd|f}tt|�j|�dS)Nz%s, unparsed data: %rZUnknown)r2r:r)rZdefectsZ
unparsed_datar)rr	r
r�szHeaderParsingError.__init__)rrrrrr6r	r	)rr
r:�sr:c@seZdZdZdS)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyN)rrrrr	r	r	r
r;�sr;N)+Z
__future__rZsix.moves.http_clientrZhttplib_IncompleteRead�	Exceptionr�Warningrrrrrrr�ConnectionErrorrrrrr r!r"r#r$�
ValueErrorr%r&r(r)r*r+r,r-r.r/r0r1r7�AssertionErrorr8r:r;r	r	r	r
�<module>sH		
	

Zerion Mini Shell 1.0