ó
    ‘Rj%  ã                   ó˜   • S SK Jr  S SKrSSKJr  SSKJr  SSKJr  SSK	J
r
Jr  S	 r\R                  SS4S
 jrS rS rS r\" S5      rg)é    )Úabsolute_importNé   )Ú_appengine_environ)ÚLocationParseError)Úsixé   )ÚNoWayToWaitForSocketErrorÚwait_for_readc                 óf   • [        U SS5      nUSL a  gUc  g [        USS9$ ! [         a     gf = f)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.
ÚsockFTg        )Útimeout)Úgetattrr
   r	   )Úconnr   s     ÚOD:\diplom_project\venv\Lib\site-packages\pip/_vendor/urllib3/util/connection.pyÚis_connection_droppedr      sH   € ô �4˜ Ó'€DØˆu‚}ØØ�|Øðä˜T¨3Ñ/Ð/øÜ$ó Ùðús   ™	# £
0¯0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       H}  nUu  pšp¼nSn [        R                  " XšU5      n[        Xã5        U[        R                  La  UR                  U5        U(       a  UR                  U5        UR                  U5        Us  $    Ub  Ue[        R                   " S5      e! [         a&    [
        R                  " [        SU-  5      S5      s $ f = f! [        R                    a*  nUnUb  UR#                  5         Sn SnAGM   SnAGM  SnAf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Ú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   %   sU  € ð$ �J€DØ‡��s×ÑØ�z‰z˜$ÓˆØ
€Cô
  Ó!€Fð
Ø�‰�FÔô ×!Ò! $¨f´f×6HÑ6HÖIˆØ-0Ñ*ˆ�e¨Øˆð	Ü—=’= ¨uÓ5ˆDô   Ô5àœf×<Ñ<Ò<Ø—‘ Ô(ÞØ—	‘	˜.Ô)Ø�L‰L˜ÔØŠKñ Jð, �Øˆ	ä
�,Š,Ð:Ó
;Ð;øô= ó 
Ü�~Š~ÜÐ?À$ÑFÓGÈó
ò 	
ð
ûô* �|‰|ó 	ØˆCØÑØ—
‘
”Ø—ö  ûð	ús*   ¹D Á<A0D?Ä-D<Ä;D<Ä?E=ÅE8Å8E=c                 ó<   • Uc  g U H  nU R                   " U6   M     g )N)Ú
setsockopt)r   ÚoptionsÚopts      r   r   r   d   s    € Ø�ØãˆØ�Š˜Óò ó    c                  ó\   • [         R                  n [        (       a  [         R                  n U $ )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ß‚xÜ×!Ñ!ˆØ€Mr8   c                 ó0  • SnSn[         R                  " 5       (       a  g[        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   Úis_appengine_sandboxr   Úhas_ipv6ÚAF_INET6r!   Ú	Exceptionr$   )r(   r   r?   s      r   Ú	_has_ipv6rB   w   sz   € à€DØ€Hô ×.Ò.×0Ñ0Øä‡‡ð	Ü—=’=¤§¡Ó1ˆDØ�I‰I�t˜Q�iÔ ØˆHö Ø�
‰
ŒØ€Oøô ó 	Ùð	ús   ¶9B Â
BÂBz::1)Ú
__future__r   r   Úcontribr   Ú
exceptionsr   Úpackagesr   Úwaitr	   r
   r   r   r3   r   r   rB   r;   © r8   r   Ú<module>rI      sN   ðÝ &ã å (Ý +Ý ß :òð8 ×*Ñ*ØØô	<<ò~òòñ< �UÓ�r8   