
    Oju                       d dl mZ d dlZd dlZd dlZd dlZd dlZd dl	m
Z
mZmZ d dlmZ d dlmZmZmZ d dlZddlmZmZmZ ddlmZmZ dd	lmZmZmZmZm 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l*m+Z+m,Z, ddl-m.Z.m/Z/m0Z0m1Z1 ddl2m3Z3 ddlm4Z4m5Z5m6Z6m7Z7 ddl8m9Z9m:Z: ddl;m<Z< ddl=m>Z> g dZ? e@ej                  j                  dd            ZC G d de<      ZD G d d      ZE	 	 d(	 	 	 	 	 	 	 d)dZF	 d dlGmHZH d dlIm.ZJ eHj                  eHj                  eHj                  eHj                  d ZMd!d"d!d"d ZN	 	 	 	 	 	 	 	 d*d#ZOd+d%ZQdddd&	 	 	 	 	 	 	 	 	 	 	 	 	 d,d'ZRy# eP$ r 	 	 	 	 	 	 	 	 d*d$ZOY .w xY w)-    )annotationsN)AsyncIterator	GeneratorSequence)TracebackType)AnyCallableLiteral   )ClientProtocolbackoffprocess_exception)HeadersHeadersLike)InvalidProxyMessageInvalidProxyStatusInvalidStatus
ProxyErrorSecurityError)ClientExtensionFactory) enable_client_permessage_deflate)validate_subprotocols)
USER_AGENTResponse)
CONNECTINGEvent)Proxy	get_proxyparse_proxyprepare_connect_request)StreamReader)
LoggerLikeOriginPathLikeSubprotocol)WebSocketURI	parse_uri   )
Connection)race_events)connectunix_connectClientConnectionWEBSOCKETS_MAX_REDIRECTS10c                  r     e Zd ZdZddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
 fdZdef	 	 	 	 	 ddZd fd	Z xZS )r-   al  
    :mod:`trio` implementation of a WebSocket client connection.

    :class:`ClientConnection` provides :meth:`recv` and :meth:`send` coroutines
    for receiving and sending messages.

    It supports asynchronous iteration to receive messages::

        async for message in websocket:
            await process(message)

    The iterator exits normally when the connection is closed with close code
    1000 (OK) or 1001 (going away) or without a close code. It raises a
    :exc:`~websockets.exceptions.ConnectionClosedError` when the connection is
    closed with any other code.

    The ``ping_interval``, ``ping_timeout``, ``close_timeout``, and
    ``max_queue`` arguments have the same meaning as in :func:`connect`.

    Args:
        nursery: Trio nursery.
        stream: Trio stream connected to a WebSocket server.
        protocol: Sans-I/O connection.

       
      ping_intervalping_timeoutclose_timeout	max_queuec          	     h    |  t         |   |||||||       t        j                         | _        y )Nr4   )super__init__trior   response_rcvd)	selfnurserystreamprotocolr5   r6   r7   r8   	__class__s	           m/var/www/origus_pro_usr/data/www/origus.pro/core/.venv/lib/python3.12/site-packages/websockets/trio/client.pyr;   zClientConnection.__init__D   s?     	'%' 	 	
 "ZZ\    Nc                n  K   | j                   j                         | _        |%| j                  j                  j	                  |       |&| j                  j                  j                  d|       | j                  t              4 d{    | j                   j                  | j                         ddd      d{    t        | j                  | j                         d{    | j                   j                  | j                   j                  y7 7 [# 1 d{  7  sw Y   kxY w7 Jw)z1
        Perform the opening handshake.

        Nz
User-Agent)expected_state)rA   r+   requestheadersupdate
setdefaultsend_contextr   send_requestr*   r=   stream_closedhandshake_exc)r>   additional_headersuser_agent_headers      rC   	handshakezClientConnection.handshake[   s      }},,.)LL  ''(:;(LL  ++L:KL$$J$? 	5 	5MM&&t||4	5 	5 $,,d.@.@AAA ==&&2----- 3	5 	5 	5 	5 	5 	BsT   B	D5DD5&D5D5 D'D5(D3)2D5D5D0$D'%D0,D5c                    | j                   4t        |t              sJ || _         | j                  j	                          yt
        |   |       y)z.
        Process one incoming event.

        N)response
isinstancer   r=   setr:   process_event)r>   eventrB   s     rC   rV   zClientConnection.process_eventu   sG     == eX...!DM""$ G!%(rD   )r?   trio.Nurseryr@   trio.abc.StreamrA   r   r5   float | Noner6   rZ   r7   rZ   r8   *int | None | tuple[int | None, int | None]returnNone)rO   HeadersLike | NonerP   
str | Noner\   r]   )rW   r   r\   r]   )	__name__
__module____qualname____doc__r;   r   rQ   rV   __classcell__)rB   s   @rC   r-   r-   )   s    @ ')%'&(@B**  * !	* $* #* $* >* 
*2 26(2... &. 
	.4) )rD   r-   c                     e Zd ZdZddddddddedddeddddeddddd		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
ZddZddZ	ddZ
ddZddZddZ	 	 	 	 	 	 	 	 ddZddZ	 	 	 	 	 	 	 	 ddZddZy)r+   aq  
    Connect to the WebSocket server at ``uri``.

    :func:`connect` should be treated as an asynchronous context manager
    yielding a :class:`ClientConnection`, which can then receive and send
    messages::

        from websockets.trio.client import connect

        async with connect(...) as websocket:
            ...

    The connection is closed automatically when exiting the context.

    :func:`connect` can also be treated as an infinite asynchronous iterator
    to reconnect automatically on errors::

        async for websocket in connect(...):
            try:
                ...
            except websockets.exceptions.ConnectionClosed:
                continue

    If the connection fails with a transient error, it is retried with
    exponential backoff. If it fails with a fatal error, the exception is
    raised, breaking out of the loop.

    The connection is closed automatically after each iteration of the loop.

    :func:`connect` cannot be awaited directly. This is because it runs a task
    to manage the connection and Trio doesn't support spawning tasks without a
    context that ensures completion.

    Args:
        uri: URI of the WebSocket server.
        stream: Preexisting TCP stream. ``stream`` overrides the host and port
            from ``uri``. You may call :func:`~trio.open_tcp_stream` to create a
            suitable TCP stream.
        ssl: Configuration for enabling TLS on the connection.
        server_hostname: Host name for the TLS handshake. ``server_hostname``
            overrides the host name from ``uri``.
        origin: Value of the ``Origin`` header, for servers that require it.
        extensions: List of supported extensions, in order in which they
            should be negotiated and run.
        subprotocols: List of supported subprotocols, in order of decreasing
            preference.
        compression: The "permessage-deflate" extension is enabled by default.
            Set ``compression`` to :obj:`None` to disable it. See the
            :doc:`compression guide <../../topics/compression>` for details.
        additional_headers: Arbitrary HTTP headers to add to the handshake
            request.
        user_agent_header: Value of  the ``User-Agent`` request header.
            It defaults to ``"Python/x.y.z websockets/X.Y"``.
            Setting it to :obj:`None` removes the header.
        proxy: If a proxy is configured, it is used by default. Set ``proxy``
            to :obj:`None` to disable the proxy or to the address of a proxy
            to override the system configuration. See the :doc:`proxy docs
            <../../topics/proxies>` for details.
        proxy_ssl: Configuration for enabling TLS on the proxy connection.
        proxy_server_hostname: Host name for the TLS handshake with the proxy.
            ``proxy_server_hostname`` overrides the host name from ``proxy``.
        process_exception: When reconnecting automatically, tell whether an
            error is transient or fatal. The default behavior is defined by
            :func:`~websockets.client.process_exception`. Refer to its
            documentation for details.
        open_timeout: Timeout for opening the connection in seconds.
            :obj:`None` disables the timeout.
        ping_interval: Interval between keepalive pings in seconds.
            :obj:`None` disables keepalive.
        ping_timeout: Timeout for keepalive pings in seconds.
            :obj:`None` disables timeouts.
        close_timeout: Timeout for closing the connection in seconds.
            :obj:`None` disables the timeout.
        reconnect_delays: Delays in seconds between reconnection attempts.
            Default is exponential backoff with 5s jitter, capped at 60s.
        max_size: Maximum size of incoming messages in bytes.
            :obj:`None` disables the limit. You may pass a ``(max_message_size,
            max_fragment_size)`` tuple to set different limits for messages and
            fragments when you expect long messages sent in short fragments.
        max_queue: High-water mark of the buffer where frames are received.
            It defaults to 16 frames. The low-water mark defaults to ``max_queue
            // 4``. You may pass a ``(high, low)`` tuple to set the high-water
            and low-water marks. If you want to disable flow control entirely,
            you may set it to ``None``, although that's a bad idea.
        logger: Logger for this client.
            It defaults to ``logging.getLogger("websockets.client")``.
            See the :doc:`logging guide <../../topics/logging>` for details.
        create_connection: Factory for the :class:`ClientConnection` managing
            the connection. Set it to a wrapper or a subclass to customize
            connection handling.

    Any other keyword arguments are passed to :func:`~trio.open_tcp_stream`.
    For example, you can set ``host`` and ``port`` to connect to a different
    host and port from those found in ``uri``. This only changes the destination
    of the TCP connection. The host name from ``uri`` is still used in the TLS
    handshake for secure connections and in the ``Host`` header.

    Raises:
        InvalidURI: If ``uri`` isn't a valid WebSocket URI.
        InvalidProxy: If ``proxy`` isn't a valid proxy.
        OSError: If the TCP connection fails.
        InvalidHandshake: If the opening handshake fails.
        TimeoutError: If the opening handshake times out.

    NdeflateTr2   r1   i   r3   )r@   sslserver_hostnameorigin
extensionssubprotocolscompressionrO   rP   proxy	proxy_sslproxy_server_hostnamer   open_timeoutr5   r6   r7   reconnect_delaysmax_sizer8   loggercreate_connectionc               (   || _         t        |      | _        | j                  j                  s|t	        d      |t        |       |dk(  rt        |      }n|t	        d|       |t        j                  d      }|t        }|| _
        || _        || _        |	| _        |
| _        || _        || _        || _        || _        || _        || _        || _        || _        || _        t1        |||||      | _        t1        ||||      | _        y )Nz-ssl argument is incompatible with a ws:// URIrf   zunsupported compression: zwebsockets.client)ri   rj   rk   rr   rs   r4   )urir'   ws_urisecure
ValueErrorr   r   logging	getLoggerr-   r@   rg   rh   rO   rP   rm   rn   ro   r   rp   rq   rs   rt   open_tcp_stream_kwargsdictprotocol_kwargsconnection_kwargs)r>   rv   r@   rg   rh   ri   rj   rk   rl   rO   rP   rm   rn   ro   r   rp   r5   r6   r7   rq   rr   r8   rs   rt   kwargss                            rC   r;   zconnect.__init__   s1   H n{{!!coLMM#!,/)#9*EJ$8FGG>&&':;F$ 0."4!2
"%:"!2( 0!2&,##!% 
 "&'%'	"
rD   c                  K   | j                   j                         }|j                  dd      }| j                  }|rd}|du rt	        | j
                        }|r,t        j                  |j                  d             d{   S |t        |      }|j                  dd dk(  r0t        || j
                  |j                  dd      	       d{   S |j                  dd
 dk(  rg|j                  dk7  r| j                  t        d      t        || j
                  f| j                  | j                  | j                  d| d{   S t!        d      |j#                  d| j
                  j$                         |j#                  d| j
                  j&                         t        j(                  di | d{   S 7 A7 7 }7 w)zFOpen a TCP or Unix connection to the server, possibly through a proxy.unixFNTpath   sockslocal_address)
local_addr   httphttpsz8proxy_ssl argument is incompatible with an http:// proxyrP   rg   rh   z&parse_proxy returned unsupported proxyhostport )r|   copypoprm   r   rw   r<   open_unix_socketr   schemeconnect_socks_proxyrn   ry   connect_http_proxyrP   ro   AssertionErrorrJ   r   r   open_tcp_stream)r>   r   r   rm   proxy_parseds        rC   r   zconnect.open_tcp_streamF  s    ,,113zz&%(

ED=dkk*E..vzz&/ABBB&u-L""2A&'10 KK  &zz/4@   $$Ra(F2&&'1dnn6P$R  0 KK '+&<&<$($>$>    %%MNN fdkk&6&67fdkk&6&67--7777E C 8sK   A?GGAGGA8G	G
A3G=G	>GGG	Gc                ,  K   | j                   t        j                         }n| j                   }| j                  | j                  j
                  }n| j                  }t        j                  |||d      }|j                          d{    |S 7 w)zEnable TLS on the connection.NTrh   https_compatible)	rg   
ssl_modulecreate_default_contextrh   rw   r   r<   	SSLStreamdo_handshake)r>   r@   rg   rh   
ssl_streams        rC   
enable_tlszconnect.enable_tlsv  s     88335C((C'"kk..O"22O^^+!	

 %%''' 	(s   B	BBBc                  K   | j                   | j                          d{   }n| j                   }	 | j                  j                  r| j	                  |       d{   }t        | j                  fi | j                  } | j                  |||fi | j                  }|j                  | j                  | j                         d{    |S 7 7 u7 
# t        j                  $ r* t        j                  |       d{  7   t        d      t         $ r  t        j                  |       d{  7    w xY ww)zCreate a WebSocket connection.Nznursery should be canceled)r@   r   rw   rx   r   r   r~   rt   r   rQ   rO   rP   r<   	Cancelledaclose_forcefullyr   	Exception)r>   r?   r@   rA   
connections        rC   open_connectionzconnect.open_connection  s6    ;;//11F[[F!	{{!!#v66%&&H 0// ((	J &&''&&  $ O 2 7
 ~~ 	?((000 !!=>> 	 ((000	sc    E CE *C C A,C CC E C C +D=D0D=5D86D==E c                   t        |t              r0|j                  j                  dv rd|j                  j                  v s|S | j
                  }t        j                  j                  | j                  |j                  j                  d         }t        |      }| j                  t        d| d      S |j                  r|j                  st        d|       S |j                  |j                  k7  s2|j                  |j                  k7  s|j                   |j                   k7  r| j"                  j%                  dd      rt        d| d	      S | j"                  j%                  d
      | j"                  j%                  d      t        d| d      S | j&                  8t)        d t)        | j&                        j+                         D              | _        |S )z
        Determine whether a connection error is a redirect that can be followed.

        Return the new URI if it's a valid redirect. Else, return an exception.

        ),  i-  i.  i/  i3  i4  Locationzcannot follow redirect to z with a preexisting streamz)cannot follow redirect to non-secure URI r   Fz'cannot follow cross-origin redirect to z with a Unix socketr   r   z with an explicit host or portc              3  N   K   | ]  \  }}|j                         d vr||f  yw))authorizationcookiezproxy-authorizationN)lower).0keyvalues      rC   	<genexpr>z+connect.process_redirect.<locals>.<genexpr>  s2      &C99;QR es   #%)rT   r   rS   status_coderH   rw   urllibparseurljoinrv   r'   r@   ry   rx   r   r   r   r|   getrO   r   	raw_items)r>   exc
old_ws_urinew_uri
new_ws_uris        rC   process_redirectzconnect.process_redirect  s    sM*(( cll222J[[
,,&&txx1E1Ej1QRw'
 ;;",WI5OP 
 Z%6%6 #LWI!VWW !2!22*//1*//1 **..vu=!=gY G) *  ++//7C..226:F!=gY G4 5  &&2*1*1$2I2I*J*T*T*V+' rD   c                \  K   	 | j                   t        j                         nt        j                  | j                         5  t	        t
              D ]8  }	 | j                  |       d {   }|j                          |c cd d d        S  t        dt
         d      7 5# t        $ rJ}| j                  |      }t        |t              r||u r |||| _        t        |      | _        Y d }~d }~ww xY w# 1 sw Y   y xY w# t        j                  $ r}t!        d      |d }~ww xY ww)Nz
more than z
 redirectsz"timed out during opening handshake)rp   r<   CancelScope
fail_afterrangeMAX_REDIRECTSr   start_keepaliver   r   rT   rv   r'   rw   r   TooSlowErrorTimeoutError)r>   r?   _r   r   
exc_or_uris         rC   r+   zconnect.connect  s4    	N $$,   "__T%6%67P
 }- PA*+/+?+?+H%H
  #224))1P P
P* (*]O:(NOO' &I$ %%)%:%:3%?
%j)<)S0 %&0c 9 (2DH*3J*?DK$%P P8    	NCD#M	Ns   D,?D C9B#+B!,B#0C9	D D,C9!B##	C6,A C1,C91C66C99D>D D,D D)D$$D))D,c                B  K   | j                          d {    	 | j                  | j                         d {   | _        | j                  S 7 97 # t        $ r?}| j                  t        |      ||j                         d {  7   t        d      d }~ww xY ww)Nz4expected __aexit_nursery__ to re-raise the exception)	__aenter_nursery__r+   r?   r   BaseException__aexit_nursery__type__traceback__r   )r>   r   s     rC   
__aenter__zconnect.__aenter__$  s     %%'''	Y$(LL$>>DO??" 	(> 	Y((cC9J9JKKK !WXX	YsN   BABA AA BA 	B)BB	BBBc                   K   	 	 | j                   j                          d {    | ` 	 | j                  |||       d {    y 7 ## | ` w xY w7 # | j                  |||       d {  7   w xY ww)N)r   acloser   )r>   exc_type	exc_value	tracebacks       rC   	__aexit__zconnect.__aexit__-  sk     	I$oo,,...O((9iHHH	 /OH$((9iHHHsZ   A2A AA A A2 AA2A AA A2A/(A+)A//A2c                   K   t        | d      rt        d      t        j                         | _        | j                  j                          d {   | _        y 7 
w)Nnursery_managerzconnect() isn't reentrant)hasattrRuntimeErrorr<   open_nurseryr   r   r?   )r>   s    rC   r   zconnect.__aenter_nursery__;  sJ     4*+:;;#002!11<<>>>s   AAAAc                ^  K   	 | j                   j                  |||       d {    | ` y 7 # t        $ rl}t        |t              sJ 	 t
        j                  j                  |       n-# t
        j                  j                  $ r t        d      |w xY wY d }~| ` y d }~ww xY w# | ` w xY ww)Nz8unexpected multiple exceptions; please file a bug report)
r   r   r   rT   BaseExceptionGroupr<   _util!raise_single_exception_from_groupMultipleExceptionErrorr   )r>   r   r   r   r   s        rC   r   zconnect.__aexit_nursery__A  s     	%&&009iPPP $ Q 	c#5666

<<SA::44 $N B $	 $s`   B- . ,. B-. 	B#B
A*)B**BBB& B-B##B& &B**B-c                 K   d }	 	 | 4 d {   }| d d d       d {    d }$7 7 	# 1 d {  7  sw Y   xY w# t         $ r}	 | j                  |      }n# t         $ r}|}Y d }~nd }~ww xY w||u r ||||| j                         }t        |      }| j                  j                  d|t        j                  |      d   j                                t        j                  |       d {  7   Y d }~d }~ww xY ww)Nz0connect failed; reconnecting in %.1f seconds: %sr   )r   r   rq   nextrs   infor   format_exception_onlystripr<   sleep)r>   delaysr   r   new_exc
raised_excdelays          rC   	__aiter__zconnect.__aiter__[  s    *." % %:$$% %B G % % % % % (
)"44S9G  )(G)
 c>&!s* >!224FV  F33C8;AAC
 jj'''7(s   D
A *A .A ,A D
A A A 7A A 	DAD	A4(A/*D/A44BD7C:8D=D
DD
)2rv   strr@   ztrio.abc.Stream | Nonerg   ssl_module.SSLContext | Nonerh   r_   ri   zOrigin | Nonerj   z'Sequence[ClientExtensionFactory] | Nonerk   zSequence[Subprotocol] | Nonerl   r_   rO   r^   rP   r_   rm   zstr | Literal[True] | Nonern   r   ro   r_   r   z'Callable[[Exception], Exception | None]rp   rZ   r5   rZ   r6   rZ   r7   rZ   rq   zCallable[[], Generator[float]]rr   r[   r8   r[   rs   zLoggerLike | Nonert   ztype[ClientConnection] | Noner   r   r\   r]   )r\   rY   )r@   rY   r\   rY   )r?   rX   r\   r-   )r   r   r\   zException | str)r\   r-   )r   ztype[BaseException] | Noner   zBaseException | Noner   zTracebackType | Noner\   r]   )r\   r]   )r\   zAsyncIterator[ClientConnection])r`   ra   rb   rc   r   r   r   r;   r   r   r   r   r+   r   r   r   r   r   r   rD   rC   r+   r+      s   hd *.,0&* $>B59"+15(2,026,0EV%'&(%'&(;B?D@B$(;?AQ
Q

 'Q
 *Q
 $Q
 Q
 <Q
 3Q
  Q
 /Q
 &Q
  *!Q
" 0#Q
$  *%Q
& C'Q
* #+Q
, $-Q
. #/Q
0 $1Q
2 93Q
6 =7Q
8 >9Q
< "=Q
@ 9AQ
D EQ
F 
GQ
f.8`&*XFP NNYI,I (I (	I
 
I?%,% (% (	%
 
%4%rD   r+   c                    |j                  d      }| |t        d      | |t        d      ||j                  d      d}nd}t        d	|d| d|S )
a  
    Connect to a WebSocket server listening on a Unix socket.

    This function accepts the same keyword arguments as :func:`connect`.

    It's only available on Unix.

    It's mainly useful for debugging servers listening on Unix sockets.

    Args:
        path: File system path to the Unix socket.
        uri: URI of the WebSocket server. ``uri`` defaults to
            ``ws://localhost/`` or, when a ``ssl`` argument is provided, to
            ``wss://localhost/``.

    r@   zmissing path argumentz path is incompatible with streamrg   zws://localhost/zwss://localhost/T)rv   r   r   r   )r   ry   r+   )r   rv   r   r@   s       rC   r,   r,     ss    * ZZ!F|011		f0;<<
{::e$#C$C;sD;F;;rD   )	ProxyType)r   )socks5hsocks5socks4asocks4TFc           	       K   t        t        | j                     | j                  | j                  | j
                  | j                  t        | j                           }	 t        j                   |j                  |j                  |j                  fi | d{         S 7 # t        $ r  t        $ r}t        d      |d}~ww xY ww)z0Connect via a SOCKS proxy and return the socket.Nz failed to connect to SOCKS proxy)
SocksProxySOCKS_PROXY_TYPESr   r   r   usernamepasswordSOCKS_PROXY_RDNSr<   SocketStreamr+   OSErrorr   r   )rm   rw   r   socks_proxyr   s        rC   r   r     s      !ell+JJJJNNNNU\\*
	J$$)k))&++v{{MfMM M 	 	J?@cI	Js<   AC	:B# B!B#  C	!B# #C5CCC	c                    K   t        d      w)Nz6connecting through a SOCKS proxy requires python-socks)ImportError)rm   rw   r   s      rC   r   r     s     
 RSSs   c                0  K   t               }t        j                  |j                  |j                  |j
                  d      }	 	 | j                  d       d {   }|r|j                  |       n|j                          t        |       I7 4# t        $ ra}t        |j                  t              sJ |j                  }d|j                  cxk  rdk  rn t        |      |cY d }~S t        |      d }~wt        $ r}t!        d      |d }~ww xY ww)NT)rm   i      r   z0did not receive a valid HTTP response from proxy)r!   r   r   	read_line
read_exactread_to_eofreceive_some	feed_datafeed_eofr   StopIterationrT   r   r   r   r   r   )r@   readerparserdatar   rS   s         rC   read_connect_responser    s     ^F^^	F,,T22D  &!L 2  /#))X...99(&&,, %X.. O$X.. !>
	sO   ADB B5B 	DAC6%D&D+C66DDDDr   c               <  K   t        j                  | j                  | j                  fi | d {   }	 | j                  dk(  rW|t        j                         }|| j                  }t        j                  |||d      }|j                          d {    |}t        | ||      }|j                  |       d {    t        |       d {    |S 7 7 C7 7 # t         j                  t        f$ r  t        j                  |       d {  7    w xY ww)Nr   Tr   )r<   r   r   r   r   r   r   r   r   r    send_allr  r   r   r   )	rm   rw   rP   rg   rh   r   r@   r   rG   s	            rC   r   r     s     ''

EJJI&IIF<<7"{ 779&"'** /!%	J ))+++F *%9JKoog&&&#F+++ M7 J ,
 	'+NNI& $$V,,,si   /DCDAC  C'C  >C?C  CC  DC  C  C   1DDDD)NN)r   zPathLike | Nonerv   r_   r   r   r\   r+   )rm   r   rw   r&   r   r   r\   rY   )r@   rY   r\   r   )rm   r   rw   r&   rP   r_   rg   r   rh   r_   r   r   r\   rY   )S
__future__r   rz   osrg   r   r   urllib.parser   collections.abcr   r   r   typesr   typingr   r	   r
   r<   clientr   r   r   datastructuresr   r   
exceptionsr   r   r   r   r   extensions.baser   extensions.permessage_deflater   rH   r   http11r   r   rA   r   r   rm   r   r   r   r    streamsr!   r"   r#   r$   r%   rv   r&   r'   r   r)   utilsr*   __all__intenvironr   r   r-   r+   r,   python_socksr   python_socks.async_.trior   SOCKS5SOCKS4r   r   r   r   r  r   r   rD   rC   <module>r      s   "  	    > >  ) )  ? ? 1  5 L + ) ( J J " > > ) "  :BJJNN#=tDEX)z X)x{ {~ !!<
!<	!< !< 	!<H4J&< ##""##""	 	JJJ J 
	J6B %)(,"&%%% "	%
 
&%  % % %a  TTTT T 
	TTs   7E   E43E4