<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    `,                 @   s   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	d
 ZejddfddZdd Zdd Zdd ZedZdS )    )absolute_importN)LocationParseError   )_appengine_environ)six   )NoWayToWaitForSocketErrorwait_for_readc             C   sJ   t | dd}|dkrdS |dkr$dS yt|ddS  tk
rD   dS X dS )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   )Zconnr
    r   H/opt/alt/python37/lib/python3.7/site-packages/urllib3/util/connection.pyis_connection_dropped   s    
r   c             C   s.  | \}}| dr|d}d}t }y|d W n$ tk
rX   ttd| dS X xt	|||tj
D ]}|\}	}
}}}d}yHt|	|
|}t|| |tjk	r|| |r|| || |S  tjk
r } z|}|dk	 r|  d}W dd}~X Y qnX qnW |dk	r |tddS )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[]NZidnaz'%s', label empty or too longz!getaddrinfo returns an empty list)
startswithstripallowed_gai_familyencodeUnicodeErrorr   Z
raise_fromr   socketgetaddrinfoSOCK_STREAM_set_socket_options_GLOBAL_DEFAULT_TIMEOUT
settimeoutbindconnecterrorclose)addressr   source_addressZsocket_optionshostporterrfamilyresafsocktypeproto	canonnamesar
   er   r   r   create_connection&   s<    








r-   c             C   s(   |d krd S x|D ]}| j |  qW d S )N)
setsockopt)r
   optionsoptr   r   r   r   e   s    
r   c              C   s   t j} trt j} | S )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%   r   r   r   r   m   s    r   c             C   sb   d}d}t  rdS tjrRy"ttj}|| df d}W n tk
rP   Y nX |r^|  |S )z4Returns True if the system can bind an IPv6 address.NFr   T)r   Zis_appengine_sandboxr   has_ipv6AF_INET6r   	Exceptionr   )r"   r
   r4   r   r   r   	_has_ipv6x   s    r7   z::1)
__future__r   r   Zurllib3.exceptionsr   Zcontribr   packagesr   waitr   r	   r   r   r-   r   r   r7   r2   r   r   r   r   <module>   s   ;