Your IP : 3.17.175.167


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyc

�
�Rec@@s�ddlmZddlZddlmZmZddlmZd�Zej	ddd�Zd	�Zd
�Z
d�Zed�ZdS(
i(tabsolute_importNi(tNoWayToWaitForSocketErrort
wait_for_readi(t_appengine_environcC@s_t|dt�}|tkr"tS|dkr2tSyt|dd�SWntk
rZtSXdS(s 
    Returns True if the connection is dropped and should be closed.

    :param conn:
        :class:`httplib.HTTPConnection` object.

    Note: For platforms like AppEngine, this will always return ``False`` to
    let the platform handle connection recycling transparently for us.
    tsockttimeoutgN(tgetattrtFalsetNonetTrueRR(tconnR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pytis_connection_droppeds

cC@sO|\}}|jd�r-|jd�}nd}t�}x�tj|||tj�D]�}|\}	}
}}}
d}yltj|	|
|�}t||�|tjk	r�|j	|�n|r�|j
|�n|j|
�|SWqXtjk
r"}|}|dk	r#|j
�d}q#qXXqXW|dk	r<|�ntjd��dS(sdConnect 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:`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.
    t[s[]s!getaddrinfo returns an empty listN(t
startswithtstripRtallowed_gai_familytsockettgetaddrinfotSOCK_STREAMt_set_socket_optionst_GLOBAL_DEFAULT_TIMEOUTt
settimeouttbindtconnectterrortclose(taddressRtsource_addresstsocket_optionsthosttportterrtfamilytrestaftsocktypetprotot	canonnametsaRte((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pytcreate_connection!s2	"


	cC@s2|dkrdSx|D]}|j|�qWdS(N(Rt
setsockopt(Rtoptionstopt((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyRYs
cC@stj}trtj}n|S(s�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.(RtAF_INETtHAS_IPV6t	AF_UNSPEC(R ((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyRas	cC@s�d}t}tj�rtStjrky/tjtj�}|j|df�t}Wqkt	k
rgqkXn|r~|j
�n|S(s6 Returns True if the system can bind an IPv6 address. iN(RRRtis_appengine_sandboxRthas_ipv6tAF_INET6RR	t	ExceptionR(RRR0((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyt	_has_ipv6ls	


s::1(t
__future__RRtwaitRRtcontribRRRRR(RRR3R-(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/connection.pyt<module>s	4			

?>