
    'j              
          % S SK Jr  S SKJrJrJrJr  S SKJr  S SK	J
r
Jr  S SKJr  S SKJr  S SKJrJrJrJrJr  S SKJr  \\\S	-  \S	-  4   -  \R4                  R6                  -  S	-  r\\S
'   SS0r\\ \ 4   \S'   Sr!S\SS	4S jr"\!4S\S\#S\\$S	S	4   4S jjr%S\S\S   S\4S jr&S\RN                  RP                  S\ S\ S\S\4
S jr)S\
RT                  \
R6                  -  S\ S\S\4S jr+g	)    )	Generator)LiteralNoReturn	TypeAliascast)urlsplit)requestsurllib3)Response)TimeoutStateError)ConnectionFailedErrorConnectionTimeoutErrorNetworkConnectionErrorProxyConnectionErrorSSLVerificationError)redact_auth_from_urlNTimeoutValuezAccept-EncodingidentityHEADERSi   respreturnc                    Sn[        U R                  [        5      (       a   U R                  R                  S5      nOU R                  nSU R
                  s=::  a  S:  a"  O  OU R
                   SU SU R                   3nO8SU R
                  s=::  a  S:  a!  O  OU R
                   S	U SU R                   3nU(       a	  [        XS
9eg ! [         a    U R                  R                  S5      n Nf = f)N zutf-8z
iso-8859-1i  i  z Client Error: z
 for url: iX  z Server Error: )response)
isinstancereasonbytesdecodeUnicodeDecodeErrorstatus_codeurlr   )r   http_error_msgr   s      S/var/www/html/KUNJ/venv/lib/python3.13/site-packages/pip/_internal/network/utils.pyraise_for_statusr$   .   s    N$++u%%
	6[[''0F 
d$$ xz$((L 	 
  	&3	& xz$((L 	 $^CC  " 	6[[''5F	6s   C %C54C5r   
chunk_sizec              #      #     U R                   R                  USS9 H  nUv   M	     g! [         a,     U R                   R                  U5      nU(       d   gUv   M*  f = f7f)z3Given a requests Response, provide the data chunks.F)decode_contentN)rawstreamAttributeErrorread)r   r%   chunks      r#   response_chunksr-   J   sn     #\\((. !1 ) 
E4 K5
6  LL%%j1EK	 s%   A#%* A#-A A#A  A#timeoutkind)connectr+   c                 0   [        U [        5      (       a  U u  p#OW[        U [        R                  R                  5      (       a+  [        [        S -  U R                  5      n U R                  nOU =p#US:X  a  Uc   eU$ Uc   eU$ ! [         a    S n N"f = f)Nr0   )
r   tupler
   utilTimeoutr   floatconnect_timeoutread_timeoutr   )r.   r/   r6   r7   s       r#   _parse_timeoutr8   t   s     '5!!(/%	GW\\11	2	2ut|W-D-DE	 "//L *10y***''' ! 	 L	 s   "B BBr   r!   hostc           	          [        U [        R                  R                  5      (       a  [	        XS[        US5      S9e[	        XS[        US5      S9e)Nr0   )r/   r.   r+   )r   r
   
exceptionsConnectTimeoutErrorr   r8   )r   r!   r9   r.   s       r#   _raise_timeout_errorr=      sU     &',,@@AA$I~gy/Q
 	
 %FN7F,K
 	
    errorc                :   [        U5      n[        U5      R                  =(       d    [        U5      R                  nU R                  (       a  U R                  S   OU n[        U[        R                  R                  5      (       a5  [        U[        R                  R                  5      (       d  [        XAX25        [        U[        R                  R                  5      (       a  [        XU5      e[        U[        R                  R                  5      (       d  [        XU5      eUn[        UR                  [        R                   R"                  5      (       d   eUR                  R$                  nUR                  R&                  nUR(                  n[        U[        R                  R                  5      (       a  [        XU5      e[        U[        R                  R                  5      (       a5  [        U[        R                  R                  5      (       d  [        XAXb5        [        U[        R                  R*                  5      (       a$  Uc   e[-        U[        [/        U5      5      U5      e[        X[        U[0        5      (       a  U5      eU5      e)zRaise a specific error for a given connection error, if possible.

Note: requests.ConnectionError is the parent class of
      requests.ProxyError, requests.SSLError, and requests.ConnectTimeout
      so these errors are also handled here.
r   )r   r   hostnamenetlocargsr   r
   r;   TimeoutErrorNewConnectionErrorr=   SSLErrorr   MaxRetryErrorr   poolconnectionpoolHTTPConnectionPoolr9   proxyr   
ProxyErrorr   str	Exception)r?   r!   r.   raw_hostnamer   max_retry_errorr9   rK   s           r#   raise_connection_errorrQ      s    s
#CC=))AXc]-A-AL#jjUZZ]eF &',,99:::""55D D
 	V,@&',,5566 #3f== fg00>>??#Cv>>Oo**G,B,B,U,UVVVV$$D  &&E##F&',,5566"3f55&',,99:::""55D D 	V$8&',,7788   "3(<SZ(H&QQ  Z	::6 @O r>   ),collections.abcr   typingr   r   r   r   urllib.parser   pip._vendorr	   r
   pip._vendor.requests.modelsr   pip._vendor.urllib3.exceptionsr   pip._internal.exceptionsr   r   r   r   r   pip._internal.utils.miscr   r5   r2   r3   r4   r   __annotations__r   dictrM   DOWNLOAD_CHUNK_SIZEr$   intr   r-   r8   r;   rD   r=   ConnectionErrorrQ    r>   r#   <module>r`      sd   % 5 5 ! ) 0 <  : 
E%$,,--0D0DDtK i . -j9c3h 9  D8 D D: +>''$''udD !'TL 8I0J u ,
++
	
 
 	

 
 4##h&6&664 
4 	4
 4r>   