§
    
Á³g%  ã                   ó”   — d dl mZ d dlZddlmZ ddlmZ ddlmZ ddl	m
Z
mZ d	„ Zej        ddfd
„Zd„ Zd„ Zd„ Z ed¦  «        ZdS )é    )Úabsolute_importNé   )Ú_appengine_environ)ÚLocationParseError)Úsixé   )ÚNoWayToWaitForSocketErrorÚwait_for_readc                 ó~   — t          | dd¦  «        }|du rdS |€dS 	 t          |d¬¦  «        S # t          $ r Y dS w xY w)a$  
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`http.client.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    ÚsockFNTg        )Útimeout)Úgetattrr
   r	   )Úconnr   s     úa/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_vendor/urllib3/util/connection.pyÚis_connection_droppedr      sg   € õ �4˜ Ñ'Ô'€DØˆu€}€}ØˆuØ€|Øˆtðå˜T¨3Ð/Ñ/Ô/Ð/øÝ$ð ð ð Øˆuˆuðøøøs   �. ®
<»<c                 ó  — | \  }}|                      d¦  «        r|                     d¦  «        }d}t          ¦   «         }	 |                     d¦  «         n5# t          $ r( t          j        t          d|z  ¦  «        d¦  «        cY S w xY wt          j	        |||t          j
        ¦  «        D ]»}|\  }	}
}}}d}	 t          j        |	|
|¦  «        }t          ||¦  «         |t          j        ur|                     |¦  «         |r|                     |¦  «         |                     |¦  «         |c S # t          j        $ r$}|}|�|                     ¦   «          d}Y d}~Œ´d}~ww xY w|�|‚t          j        d¦  «        ‚)ak  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Úidnaz'%s', label empty or too longz!getaddrinfo returns an empty list)Ú
startswithÚstripÚallowed_gai_familyÚencodeÚUnicodeErrorr   Ú
raise_fromr   ÚsocketÚgetaddrinfoÚSOCK_STREAMÚ_set_socket_optionsÚ_GLOBAL_DEFAULT_TIMEOUTÚ
settimeoutÚbindÚconnectÚerrorÚclose)Úaddressr   Úsource_addressÚsocket_optionsÚhostÚportÚerrÚfamilyÚresÚafÚsocktypeÚprotoÚ	canonnameÚsar   Úes                   r   Úcreate_connectionr3   %   sÃ  € ð$ �J€Dˆ$Ø‡‚�sÑÔð  Ø�zŠz˜$ÑÔˆØ
€Cõ
  Ñ!Ô!€Fð
Ø�Š�FÑÔÐÐøÝð 
ð 
ð 
ÝŒ~ÝÐ?À$ÑFÑGÔGÈñ
ô 
ð 	
ð 	
ð 	
ð
øøøõ
 Ô! $¨¨fµfÔ6HÑIÔIð ð ˆØ-0Ñ*ˆˆH�e˜Y¨Øˆð	Ý”=  X¨uÑ5Ô5ˆDõ    nÑ5Ô5Ð5à�fÔ<Ð<Ð<Ø—’ Ñ(Ô(Ð(Øð *Ø—	’	˜.Ñ)Ô)Ð)Ø�LŠL˜ÑÔÐØˆKˆKˆKøåŒ|ð 	ð 	ð 	ØˆCØÐØ—
’
‘”�Ø�øøøøøøøøøð		øøøð €Øˆ	å
Œ,Ð:Ñ
;Ô
;Ð;s+   ÁA Á/B	ÂB	Â:A6D3Ä3E&ÅE!Å!E&c                 ó,   — |€d S |D ]} | j         |Ž  Œd S )N)Ú
setsockopt)r   ÚoptionsÚopts      r   r   r   d   s7   € Ø€Øˆàð ð ˆØˆŒ˜ÐÐÐðð ó    c                  óD   — t           j        } t          rt           j        } | S )z³This 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   l   s    € õ
 Œ^€FÝð "ÝÔ!ˆØ€Mr8   c                 ó  — d}d}t          j        ¦   «         rdS t          j        rI	 t          j        t          j        ¦  «        }|                     | df¦  «         d}n# t          $ r Y nw xY w|r|                     ¦   «          |S )z4Returns True if the system can bind an IPv6 address.NFr   T)r   Úis_appengine_sandboxr   Úhas_ipv6ÚAF_INET6r!   Ú	Exceptionr$   )r(   r   r?   s      r   Ú	_has_ipv6rB   w   s�   € à€DØ€Hõ Ô.Ñ0Ô0ð Øˆuå„ð ð	Ý”=¥¤Ñ1Ô1ˆDØ�IŠI�t˜Q�iÑ Ô Ð ØˆHˆHøÝð 	ð 	ð 	ØˆDð	øøøð ð Ø�
Š
‰ŒˆØ€Os   §7A Á
A,Á+A,z::1)Ú
__future__r   r   Úcontribr   Ú
exceptionsr   Úpackagesr   Úwaitr	   r
   r   r   r3   r   r   rB   r;   © r8   r   ú<module>rI      sâ   ðØ &Ð &Ð &Ð &Ð &Ð &à €€€à (Ð (Ð (Ð (Ð (Ð (Ø +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :ðð ð ð8 Ô*ØØð	<<ð <<ð <<ð <<ð~ð ð ðð ð ðð ð ð< ˆ9�UÑÔ€€€r8   