
    3Cf|                        d dl Z d dlZd dlmZmZ d dlmZ d dlmZm	Z	 d dl
mZmZmZmZmZ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 erddlmZ ddlm Z  ddl!m"Z"m#Z# ddl$m%Z% n
dxZ"xZ#xZZ%dZ  G d de      Z& G d de      Z' G d de      Z( G d de      Z)er	ee	e*      Z+neZ+edge,f   Z- G d dee+      Z. G d de      Z/ G d de      Z0y)    N)ABCabstractmethod)Sized)
BaseCookieMorsel)
TYPE_CHECKINGAny	AwaitableCallableDict	GeneratorIterableListOptionalTuple)CIMultiDict)URL   )get_running_loop)LooseCookies)Application)HTTPException)BaseRequestRequest)StreamResponsec                   \    e Zd ZddZdeddfdZedefd       ZddZ	e
dedd	fd
       Zy)AbstractRouterreturnNc                     d| _         y )NF_frozenselfs    K/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/aiohttp/abc.py__init__zAbstractRouter.__init__$   s	        appc                      y)zPost init stage.

        Not an abstract method for sake of backward compatibility,
        but if the router wants to be aware of the application
        it can override this.
        N r#   r'   s     r$   	post_initzAbstractRouter.post_init'       r&   c                     | j                   S Nr    r"   s    r$   frozenzAbstractRouter.frozen/   s    ||r&   c                     d| _         y)zFreeze router.TNr    r"   s    r$   freezezAbstractRouter.freeze3   s	    r&   requestAbstractMatchInfoc                    K   yw)z#Return MATCH_INFO for given requestNr)   r#   r2   s     r$   resolvezAbstractRouter.resolve7           r   N)__name__
__module____qualname__r%   r   r+   propertyboolr/   r1   r   r   r6   r)   r&   r$   r   r   #   s]    [ T     2W 21D 2 2r&   r   c                      e Zd Zeedeegee   f   fd              Z	eedeegee
e      f   fd              Zeede
e   fd              Zedeeef   fd       Zeedeedf   fd              Zededd	fd
       Zedd       Zy	)r3   r   c                      y)zExecute matched request handlerNr)   r"   s    r$   handlerzAbstractMatchInfo.handler=   r,   r&   c                      y)z*Expect handler for 100-continue processingNr)   r"   s    r$   expect_handlerz AbstractMatchInfo.expect_handlerB   r,   r&   c                      y)z<HTTPException instance raised on router's resolving, or NoneNr)   r"   s    r$   http_exceptionz AbstractMatchInfo.http_exceptionI   r,   r&   c                      y)z;Return a dict with additional info useful for introspectionNr)   r"   s    r$   get_infozAbstractMatchInfo.get_infoN   r,   r&   .c                      y)z\Stack of nested applications.

        Top level application is left-most element.

        Nr)   r"   s    r$   appszAbstractMatchInfo.appsR   r,   r&   r'   Nc                      y)z)Add application to the nested apps stack.Nr)   r*   s     r$   add_appzAbstractMatchInfo.add_app[   r,   r&   c                      y)zFreeze the match info.

        The method is called after route resolution.

        After the call .add_app() is forbidden.

        Nr)   r"   s    r$   r1   zAbstractMatchInfo.freeze_   r,   r&   r9   )r:   r;   r<   r=   r   r   r   r
   r   rA   r   rC   r   rE   r   strr	   rG   r   r   rI   rK   r1   r)   r&   r$   r3   r3   <   s"   .7)Y~-F"FG .  . 9	7)Yx'?@@	A9  9
 K 7 K  K J$sCx. J J eK,-    8; 84 8 8  r&   r3   c                   X    e Zd ZdZdeddfdZedefd       Zede	e
def   fd       Zy)AbstractViewzAbstract class based view.r2   r   Nc                     || _         y r.   _requestr5   s     r$   r%   zAbstractView.__init__m   s	    r&   c                     | j                   S )zRequest instance.rQ   r"   s    r$   r2   zAbstractView.requestp   s     }}r&   c                      y)zExecute the view handler.Nr)   r"   s    r$   	__await__zAbstractView.__await__u   r,   r&   )r:   r;   r<   __doc__r   r%   r=   r2   r   r   r	   r   rU   r)   r&   r$   rO   rO   j   sZ    $   D      (9S$%>? ( (r&   rO   c                   T    e Zd ZdZededededeeee	f      fd       Z
ed	d       Zy)
AbstractResolverzAbstract DNS resolver.hostportfamilyr   c                    K   yw)z$Return IP address for given hostnameNr)   )r#   rY   rZ   r[   s       r$   r6   zAbstractResolver.resolve}   r7   r8   Nc                    K   yw)zRelease resolverNr)   r"   s    r$   closezAbstractResolver.close   r7   r8   r9   )r:   r;   r<   rV   r   rM   intr   r   r	   r6   r^   r)   r&   r$   rX   rX   z   sU     3# 3S 3# 3$tCQTH~BV 3 3  r&   rX   zMorsel[str]c                       e Zd ZdZdddeej                     ddfdZeddee	   ddfd       Z
ed	eddfd
       Ze e       fdededdfd       Zededdfd       Zy)AbstractCookieJarzAbstract Cookie Jar.N)looprb   r   c                $    t        |      | _        y r.   )r   _loop)r#   rb   s     r$   r%   zAbstractCookieJar.__init__   s    %d+
r&   	predicatec                      y)z,Clear all cookies if no predicate is passed.Nr)   )r#   re   s     r$   clearzAbstractCookieJar.clear   r,   r&   domainc                      y)z0Clear all cookies for domain and all subdomains.Nr)   )r#   rh   s     r$   clear_domainzAbstractCookieJar.clear_domain   r,   r&   cookiesresponse_urlc                      y)zUpdate cookies.Nr)   )r#   rk   rl   s      r$   update_cookiesz AbstractCookieJar.update_cookies   r,   r&   request_urlzBaseCookie[str]c                      y)z6Return the jar's cookies filtered by their attributes.Nr)   )r#   ro   s     r$   filter_cookiesz AbstractCookieJar.filter_cookies   r,   r&   r.   )r:   r;   r<   rV   r   asyncioAbstractEventLoopr%   r   ClearCookiePredicaterg   rM   rj   r   r   rn   rq   r)   r&   r$   ra   ra      s    FJ ,)B)B C ,t , ;x(<= ; ; ; ?3 ?4 ? ? HK l # RV   E# E2C E Er&   ra   c                       e Zd ZU dZdZdZdZee   e	d<   e
deddfd       Ze
ddeddfd       Ze
dd	       Ze
dd
eddfd       Ze
dd       Ze
deddddfd       Zy)AbstractStreamWriterzAbstract stream writer.r   lengthchunkr   Nc                    K   yw)zWrite chunk into stream.Nr)   r#   rx   s     r$   writezAbstractStreamWriter.write   r7   r8   c                    K   yw)zWrite last chunk.Nr)   rz   s     r$   	write_eofzAbstractStreamWriter.write_eof   r7   r8   c                    K   yw)zFlush the write buffer.Nr)   r"   s    r$   drainzAbstractStreamWriter.drain   r7   r8   encodingc                      y)zEnable HTTP body compressionNr)   )r#   r   s     r$   enable_compressionz'AbstractStreamWriter.enable_compression   r,   r&   c                      y)zEnable HTTP chunked modeNr)   r"   s    r$   enable_chunkingz$AbstractStreamWriter.enable_chunking   r,   r&   status_lineheaderszCIMultiDict[str]c                    K   yw)zWrite HTTP headersNr)   )r#   r   r   s      r$   write_headersz"AbstractStreamWriter.write_headers   r7   r8   )r&   r9   )deflate)r:   r;   r<   rV   buffer_sizeoutput_sizerw   r   r_   __annotations__r   bytesr{   r}   r   rM   r   r   r   r)   r&   r$   rv   rv      s    !KKFHSM' '4 ' '  U  T     & & +3 +t + + ' ' !!);!	! !r&   rv   c            	       Z    e Zd ZdZdej
                  deddfdZede	de
d	eddfd
       Zy)AbstractAccessLoggerzAbstract writer to access log.logger
log_formatr   Nc                      || _         || _        y r.   )r   r   )r#   r   r   s      r$   r%   zAbstractAccessLogger.__init__   s    $r&   r2   responsetimec                      y)zEmit log to logger.Nr)   )r#   r2   r   r   s       r$   logzAbstractAccessLogger.log   r,   r&   )r:   r;   r<   rV   loggingLoggerrM   r%   r   r   r   floatr   r)   r&   r$   r   r      sT    (%w~~ %3 %4 % "; ". " "RV " "r&   r   )1rr   r   abcr   r   collections.abcr   http.cookiesr   r   typingr   r	   r
   r   r   r   r   r   r   r   	multidictr   yarlr   helpersr   typedefsr   web_appr   web_exceptionsr   web_requestr   r   web_responser   r   r3   rO   rX   rM   IterableBaser>   rt   ra   rv   r   r)   r&   r$   <module>r      s      # ! +   "  % "$-1,;??K?'?K.M2S 22+ +\(3 ( 	s 	 F3K(LL   56 E| E.!3 !D	"3 	"r&   