
    жvg                      <   d dl mZ ddlmZ  G d de          Z G d de          Z G d d	e          Z	 G d
 de	          Z
 G d de          Z G d de          Z G d de          Z G d de          ZeZ G d de
          Z G d de
          Z G d de          Z G d de          Z G d dee
          Z G d de          Z G d  d!ee	          Z G d" d#e	          Z G d$ d%e	          Z G d& d'ee          Z G d( d)e          Z G d* d+e          Z G d, d-e          Z G d. d/e          Z G d0 d1e          Z G d2 d3e          Z  G d4 d5e          Z! G d6 d7e          Z" G d8 d9e          Z# G d: d;e          Z$ G d< d=ee          Z% G d> d?e          Z& G d@ dAee          Z G dB dCee          Z' G dD dEe          Z( G dF dGe)e          Z* G dH dIe          Z+ G dJ dKe          Z, G dL dMe          Z-dNS )O    )absolute_import   )IncompleteReadc                       e Zd ZdZdS )	HTTPErrorz#Base exception used by this module.N__name__
__module____qualname____doc__     [/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/pip/_vendor/urllib3/exceptions.pyr   r      s        --Dr   r   c                       e Zd ZdZdS )HTTPWarningz!Base warning used by this module.Nr   r   r   r   r   r      s        ++Dr   r   c                       e Zd ZdZd Zd ZdS )	PoolErrorz/Base exception for errors caused within a pool.c                 T    || _         t                              | |d|           d S )Nz: )poolr   __init__)selfr   messages      r   r   zPoolError.__init__   s0    	4TTT77!;<<<<<r   c                     | j         dfS )N)NN	__class__r   s    r   
__reduce__zPoolError.__reduce__   s    ~|++r   Nr	   r
   r   r   r   r   r   r   r   r   r      s8        99= = =, , , , ,r   r   c                       e Zd ZdZd Zd ZdS )RequestErrorz8Base exception for PoolErrors that have associated URLs.c                 L    || _         t                              | ||           d S N)urlr   r   )r   r   r#   r   s       r   r   zRequestError.__init__#   s'    4w/////r   c                 $    | j         d | j        d ffS r"   )r   r#   r   s    r   r   zRequestError.__reduce__'   s    ~dh555r   Nr   r   r   r   r    r        s8        BB0 0 06 6 6 6 6r   r    c                       e Zd ZdZdS )SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nr   r   r   r   r&   r&   ,           CCDr   r&   c                   "     e Zd ZdZ fdZ xZS )
ProxyErrorz,Raised when the connection to a proxy fails.c                 Z     t          t          |           j        ||g|R   || _        d S r"   )superr)   r   original_error)r   r   errorargsr   s       r   r   zProxyError.__init__5   s8    (j$(%?$????#r   r	   r
   r   r   r   __classcell__r   s   @r   r)   r)   2   s>        66$ $ $ $ $ $ $ $ $r   r)   c                       e Zd ZdZdS )DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nr   r   r   r   r2   r2   :           EEDr   r2   c                       e Zd ZdZdS )ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nr   r   r   r   r5   r5   @   s        HHDr   r5   c                       e Zd ZdZddZdS )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

    Nc                 `    || _         d|d|d}t                              | |||           d S )NzMax retries exceeded with url: z (Caused by ))reasonr    r   )r   r   r#   r:   r   s        r   r   zMaxRetryError.__init__W   s=    HKVVVTdD#w77777r   r"   r	   r
   r   r   r   r   r   r   r7   r7   M   s2         8 8 8 8 8 8r   r7   c                       e Zd ZdZddZdS )HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.   c                 X    d|z  }t                               | |||           || _        d S )Nz)Tried to open a foreign host with url: %s)r    r   retries)r   r   r#   r@   r   s        r   r   zHostChangedError.__init__b   s1    =CdD#w777r   N)r>   r;   r   r   r   r=   r=   _   s.        II     r   r=   c                       e Zd ZdZdS )TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNr   r   r   r   rB   rB   h   s        ;;Dr   rB   c                       e Zd ZdZdS )TimeoutErrorzRaised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    Nr   r   r   r   rD   rD   n   s          	Dr   rD   c                       e Zd ZdZdS )ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNr   r   r   r   rF   rF   x   s        PPDr   rF   c                       e Zd ZdZdS )ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNr   r   r   r   rH   rH      s        JJDr   rH   c                       e Zd ZdZdS )NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.Nr   r   r   r   rJ   rJ      s        RRDr   rJ   c                       e Zd ZdZdS )EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nr   r   r   r   rL   rL              MMDr   rL   c                       e Zd ZdZdS )ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nr   r   r   r   rO   rO      rM   r   rO   c                       e Zd ZdZdS )LocationValueErrorz<Raised when there is something wrong with a given URL input.Nr   r   r   r   rQ   rQ      s        FFDr   rQ   c                       e Zd ZdZd ZdS )LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.c                 T    d|z  }t                               | |           || _        d S )NzFailed to parse: %s)r   r   location)r   rU   r   s      r   r   zLocationParseError.__init__   s-    '(24))) r   Nr;   r   r   r   rS   rS      s)        GG! ! ! ! !r   rS   c                   "     e Zd ZdZ fdZ xZS )URLSchemeUnknownz2Raised when a URL input has an unsupported scheme.c                 p    d|z  }t          t          |                               |           || _        d S )NzNot supported URL scheme %s)r+   rW   r   schemer   rY   r   r   s      r   r   zURLSchemeUnknown.__init__   s7    /&8%%..w777r   r/   r   s   @r   rW   rW      s>        <<        r   rW   c                       e Zd ZdZdZdZdS )ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)r	   r
   r   r   GENERIC_ERRORSPECIFIC_ERRORr   r   r   r\   r\      s        NN.M=NNNr   r\   c                       e Zd ZdZdS )SecurityWarningz0Warned when performing security reducing actionsNr   r   r   r   r`   r`              ::Dr   r`   c                       e Zd ZdZdS )SubjectAltNameWarningzBWarned when connecting to a host with a certificate missing a SAN.Nr   r   r   r   rc   rc      s        LLDr   rc   c                       e Zd ZdZdS )InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nr   r   r   r   re   re      s        99Dr   re   c                       e Zd ZdZdS )SystemTimeWarningz0Warned when system time is suspected to be wrongNr   r   r   r   rg   rg      ra   r   rg   c                       e Zd ZdZdS )InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nr   r   r   r   ri   ri      s        SSDr   ri   c                       e Zd ZdZdS )SNIMissingWarningz9Warned when making a HTTPS request without SNI available.Nr   r   r   r   rk   rk      r'   r   rk   c                       e Zd ZdZdS )DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    Nr   r   r   r   rm   rm               
 	Dr   rm   c                       e Zd ZdZdS )ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nr   r   r   r   rp   rp      r3   r   rp   c                       e Zd ZdZdS )BodyNotHttplibCompatiblez
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    Nr   r   r   r   rr   rr      rn   r   rr   c                   (     e Zd ZdZ fdZd Z xZS )r   z
    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.
    c                 Z    t          t          |                               ||           d S r"   )r+   r   r   )r   partialexpectedr   s      r   r   zIncompleteRead.__init__   s)    nd##,,Wh?????r   c                 $    d| j         | j        fz  S )Nz/IncompleteRead(%i bytes read, %i more expected))ru   rv   r   s    r   __repr__zIncompleteRead.__repr__   s    @LMD
 
 	
r   r	   r
   r   r   r   rx   r0   r   s   @r   r   r      sV         @ @ @ @ @
 
 
 
 
 
 
r   r   c                   (     e Zd ZdZ fdZd Z xZS )InvalidChunkLengthz+Invalid chunk length in a chunked response.c                     t          t          |                               |                                |j                   || _        || _        d S r"   )r+   r{   r   telllength_remainingresponselength)r   r   r   r   s      r   r   zInvalidChunkLength.__init__
  sJ     $''00MMOOX6	
 	
 	
 !r   c                 $    d| j         | j        fz  S )Nz0InvalidChunkLength(got length %r, %i bytes read))r   ru   r   s    r   rx   zInvalidChunkLength.__repr__  s    AKLE
 
 	
r   ry   r   s   @r   r{   r{     sM        55    
 
 
 
 
 
 
r   r{   c                       e Zd ZdZdS )InvalidHeaderz(The header provided was somehow invalid.Nr   r   r   r   r   r     s        22Dr   r   c                   "     e Zd ZdZ fdZ xZS )ProxySchemeUnknownz1ProxyManager does not support the supplied schemec                 |    |dk    rd }|d}nd|z  }t          t          |                               |           d S )N	localhostz>Proxy URL had no scheme, should start with http:// or https://zCProxy URL had unsupported scheme %s, should use http:// or https://)r+   r   r   rZ   s      r   r   zProxySchemeUnknown.__init__#  s[     [  F>VGG V  	 $''0099999r   r/   r   s   @r   r   r     s>        ;;: : : : : : : : :r   r   c                       e Zd ZdZdS )ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNr   r   r   r   r   r   2  s        GGDr   r   c                   "     e Zd ZdZ fdZ xZS )HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.c                 j    |pdd|}t          t          |                               |           d S )NUnknownz, unparsed data: )r+   r   r   )r   defectsunparsed_datar   r   s       r   r   zHeaderParsingError.__init__;  s?    -4-A	-A-A==Q $''0099999r   r/   r   s   @r   r   r   8  s>        XX: : : : : : : : :r   r   c                       e Zd ZdZdS )UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNr   r   r   r   r   r   @  r'   r   r   N).
__future__r   packages.six.moves.http_clientr   httplib_IncompleteRead	Exceptionr   Warningr   r   r    r&   r)   r2   r5   ConnectionErrorr7   r=   rB   rD   rF   rH   rJ   rL   rO   
ValueErrorrQ   rS   rW   r\   r`   rc   re   rg   ri   rk   rm   rp   rr   r{   r   AssertionErrorr   r   r   r   r   r   r   <module>r      s`   & & & & & & T T T T T T
	 	 	 	 		 	 	 		 	 	 	 	' 	 	 		, 	, 	, 	, 	,	 	, 	, 	,	6 	6 	6 	6 	69 	6 	6 	6	 	 	 	 	y 	 	 	$ $ $ $ $ $ $ $	 	 	 	 	) 	 	 		 	 	 	 	I 	 	 	  8 8 8 8 8L 8 8 8$    |   	 	 	 	 		 	 	 		 	 	 	 	9 	 	 		 	 	 	 	|\ 	 	 		 	 	 	 	, 	 	 		 	 	 	 	,i 	 	 		 	 	 	 	Y 	 	 		 	 	 	 	i 	 	 		 	 	 	 	Y 	 	 	! ! ! ! !+ ! ! !    )   > > > > >I > > >	 	 	 	 	k 	 	 		 	 	 	 	O 	 	 		 	 	 	 	_ 	 	 		 	 	 	 	 	 	 		 	 	 	 	o 	 	 		 	 	 	 	 	 	 		 	 	 	 	 	 	 		 	 	 	 	
 	 	 		 	 	 	 	y 	 	 	
 
 
 
 
Y 6 
 
 
$
 
 
 
 
$: 
 
 
"	 	 	 	 	I 	 	 	: : : : :)9 : : :(	 	 	 	 	Z 	 	 	: : : : : : : :	 	 	 	 	I 	 	 	 	 	r   