
    h\                       S SK Jr  S SKrS SKrSSKJr  SSKJrJr  \	\
\\\R                  \\4   4      r\R                  (       a  SSKJr  SS jr\SS4         SS	 jjr      SS
 jrSS jrSS jr\" S5      rg)    )annotationsN   )LocationParseError   )_DEFAULT_TIMEOUT_TYPE_TIMEOUT)BaseHTTPConnectionc                $    U R                   (       + $ )z
Returns True if the connection is dropped and should be closed.
:param conn: :class:`urllib3.connection.HTTPConnection` object.
)is_connected)conns    I/var/www/html/env/lib/python3.13/site-packages/urllib3/util/connection.pyis_connection_droppedr      s    
         c                   U u  pEUR                  S5      (       a  UR                  S5      nSn[        5       n UR                  S5        [        R                  " XEU[        R                  5       Hu  nUu  ppnSn [        R                  " XU5      n[        X5        U[        La  UR                  U5        U(       a  UR                  U5        UR                  U5        SnUs  $    Ub   Ue[        S5      e! [         a    [        SU S35      Sef = f! [         a&  nUnUb  UR                  5          SnAM   SnAM  SnAff = f! Snf = f)aG  Connect to *address* and return the socket object.

Convenience function.  Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object.  Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect.  If no *timeout* is supplied, the
global default timeout setting returned by :func:`socket.getdefaulttimeout`
is used.  If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
An host of '' or port 0 tells the OS to use the default.
[z[]Nidna'z', label empty or too longz!getaddrinfo returns an empty list)
startswithstripallowed_gai_familyencodeUnicodeErrorr   socketgetaddrinfoSOCK_STREAM_set_socket_optionsr   
settimeoutbindconnectOSErrorclose)addresstimeoutsource_addresssocket_optionshostporterrfamilyresafsocktypeproto	canonnamesasock_s                   r   create_connectionr2      sS   $ JDszz$
C
  !FQF !!$ff6H6HI-0*e	==u5D  5..(		.)LLCK! J. 	I
 9::C  Q 1TF*D!EFDPQ*  	C

  	 Cs0   C: <A(D-E :D
E"EEEc                <    Uc  g U H  nU R                   " U6   M     g )N)
setsockopt)r0   optionsopts      r   r   r   ]   s"      r   c                 \    [         R                  n [        (       a  [         R                  n U $ )zThis function is designed to work in the context of
getaddrinfo, where family=socket.AF_UNSPEC is the default and
will perform a DNS search for both IPv6 and IPv4 records.)r   AF_INETHAS_IPV6	AF_UNSPEC)r)   s    r   r   r   g   s"    
 ^^Fx!!Mr   c                    SnSn[         R                  (       a:   [         R                   " [         R                  5      nUR                  U S45        SnU(       a  UR                  5         U$ ! [         a     N%f = f)z4Returns True if the system can bind an IPv6 address.NFr   T)r   has_ipv6AF_INET6r   	Exceptionr!   )r&   r0   r<   s      r   	_has_ipv6r?   r   sf    DH	==1DIItQi H 

O  		s   9A- -
A:9A:z::1)r   r	   returnbool)
r"   ztuple[str, int]r#   r   r$   ztuple[str, int] | Noner%   _TYPE_SOCKET_OPTIONS | Noner@   socket.socket)r0   rC   r5   rB   r@   None)r@   zsocket.AddressFamily)r&   strr@   rA   )
__future__r   r   typing
exceptionsr   r#   r   r   listtupleintUnionbytes_TYPE_SOCKET_OPTIONSTYPE_CHECKING_base_connectionr	   r   r2   r   r   r?   r9    r   r   <module>rR      s    "   + 4E#sFLLe,D"DEF 	5! .-126	?;?;?; +?; 0	?;
 ?;D
"=	. Ur   