
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
U
    '7`                     @   sx  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rddlmZ ddlm Z  ddl!m"Z"m#Z# ddl$m%Z% nd Z" Z# ZZ%dZ G dd deZ&G dd deZ'G dd deZ(G dd deZ)er>ee	e*  Z+neZ+G dd dee+Z,G dd deZ-G dd deZ.dS )    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                   @   s^   e Zd ZddddZeddddZeeddd	Zddd
dZ	e
eddddZdS )AbstractRouterNreturnc                 C   s
   d| _ d S )NFZ_frozenself r!   >/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/abc.py__init__$   s    zAbstractRouter.__init__appr   c                 C   s   dS )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.
        Nr!   r    r%   r!   r!   r"   	post_init'   s    zAbstractRouter.post_initc                 C   s   | j S Nr   r   r!   r!   r"   frozen/   s    zAbstractRouter.frozenc                 C   s
   d| _ dS )zFreeze router.TNr   r   r!   r!   r"   freeze3   s    zAbstractRouter.freezeAbstractMatchInforequestr   c                    s   dS )z#Return MATCH_INFO for given requestNr!   r    r-   r!   r!   r"   resolve7   s    zAbstractRouter.resolve)__name__
__module____qualname__r#   r   r'   propertyboolr)   r*   r   r   r/   r!   r!   r!   r"   r   #   s   r   c                   @   s   e Zd Zeeeegee f dddZ	eeeeged f dddZ
eeee dddZeeeef dd	d
Zeeeedf dddZeeddddZeddddZdS )r+   r   c                 C   s   dS )zExecute matched request handlerNr!   r   r!   r!   r"   handler=   s    zAbstractMatchInfo.handlerNc                 C   s   dS )z*Expect handler for 100-continue processingNr!   r   r!   r!   r"   expect_handlerB   s    z AbstractMatchInfo.expect_handlerc                 C   s   dS )z<HTTPException instance raised on router's resolving, or NoneNr!   r   r!   r!   r"   http_exceptionG   s    z AbstractMatchInfo.http_exceptionc                 C   s   dS )z;Return a dict with additional info useful for introspectionNr!   r   r!   r!   r"   get_infoL   s    zAbstractMatchInfo.get_info.c                 C   s   dS )z\Stack of nested applications.

        Top level application is left-most element.

        Nr!   r   r!   r!   r"   appsP   s    zAbstractMatchInfo.appsr$   c                 C   s   dS )z)Add application to the nested apps stack.Nr!   r&   r!   r!   r"   add_appY   s    zAbstractMatchInfo.add_appc                 C   s   dS )zFreeze the match info.

        The method is called after route resolution.

        After the call .add_app() is forbidden.

        Nr!   r   r!   r!   r"   r*   ]   s    zAbstractMatchInfo.freeze)r0   r1   r2   r3   r   r
   r   r	   r   r5   r6   r   r   r7   r   strr   r8   r   r   r9   r:   r*   r!   r!   r!   r"   r+   <   s$     r+   c                   @   sN   e Zd ZdZeddddZeedddZee	e
def dd	d
ZdS )AbstractViewzAbstract class based view.Nr,   c                 C   s
   || _ d S r(   Z_requestr.   r!   r!   r"   r#   k   s    zAbstractView.__init__r   c                 C   s   | j S )zRequest instance.r=   r   r!   r!   r"   r-   n   s    zAbstractView.requestc                 C   s   dS )zExecute the view handler.Nr!   r   r!   r!   r"   	__await__s   s    zAbstractView.__await__)r0   r1   r2   __doc__r   r#   r3   r-   r   r   r   r   r>   r!   r!   r!   r"   r<   h   s   r<   c                   @   sF   e Zd ZdZeeeeeeee	f  dddZ
eddddZdS )	AbstractResolverzAbstract DNS resolver.)hostportfamilyr   c                    s   dS )z$Return IP address for given hostnameNr!   )r    rA   rB   rC   r!   r!   r"   r/   {   s    zAbstractResolver.resolveNr   c                    s   dS )zRelease resolverNr!   r   r!   r!   r"   close   s    zAbstractResolver.close)r0   r1   r2   r?   r   r;   intr   r   r   r/   rD   r!   r!   r!   r"   r@   x   s
   "r@   c                   @   sn   e Zd ZdZddeej ddddZedddd	Z	ee
 fee
dd
ddZee
ddddZdS )AbstractCookieJarzAbstract Cookie Jar.N)loop)rG   r   c                C   s   t || _d S r(   )r   Z_loop)r    rG   r!   r!   r"   r#      s    zAbstractCookieJar.__init__r   c                 C   s   dS )zClear all cookies.Nr!   r   r!   r!   r"   clear   s    zAbstractCookieJar.clear)cookiesresponse_urlr   c                 C   s   dS )zUpdate cookies.Nr!   )r    rI   rJ   r!   r!   r"   update_cookies   s    z AbstractCookieJar.update_cookieszBaseCookie[str])request_urlr   c                 C   s   dS )z6Return the jar's cookies filtered by their attributes.Nr!   )r    rL   r!   r!   r"   filter_cookies   s    z AbstractCookieJar.filter_cookies)r0   r1   r2   r?   r   asyncioZAbstractEventLoopr#   r   rH   r   r   rK   rM   r!   r!   r!   r"   rF      s   rF   c                   @   s   e Zd ZdZdZdZdZeeddddZ	ededddd	Z
edd
ddZededdddZedd
ddZeedddddZdS )AbstractStreamWriterzAbstract stream writer.r   N)chunkr   c                    s   dS )zWrite chunk into stream.Nr!   r    rP   r!   r!   r"   write   s    zAbstractStreamWriter.write    c                    s   dS )zWrite last chunk.Nr!   rQ   r!   r!   r"   	write_eof   s    zAbstractStreamWriter.write_eofr   c                    s   dS )zFlush the write buffer.Nr!   r   r!   r!   r"   drain   s    zAbstractStreamWriter.draindeflate)encodingr   c                 C   s   dS )zEnable HTTP body compressionNr!   )r    rW   r!   r!   r"   enable_compression   s    z'AbstractStreamWriter.enable_compressionc                 C   s   dS )zEnable HTTP chunked modeNr!   r   r!   r!   r"   enable_chunking   s    z$AbstractStreamWriter.enable_chunkingzCIMultiDict[str])status_lineheadersr   c                    s   dS )zWrite HTTP headersNr!   )r    rZ   r[   r!   r!   r"   write_headers   s    z"AbstractStreamWriter.write_headers)rS   )rV   )r0   r1   r2   r?   buffer_sizeZoutput_sizelengthr   bytesrR   rT   rU   r;   rX   rY   r\   r!   r!   r!   r"   rO      s&    rO   c                   @   s<   e Zd ZdZejeddddZee	e
eddddZdS )	AbstractAccessLoggerzAbstract writer to access log.N)logger
log_formatr   c                 C   s   || _ || _d S r(   )ra   rb   )r    ra   rb   r!   r!   r"   r#      s    zAbstractAccessLogger.__init__)r-   responsetimer   c                 C   s   dS )zEmit log to logger.Nr!   )r    r-   rc   rd   r!   r!   r"   log   s    zAbstractAccessLogger.log)r0   r1   r2   r?   loggingLoggerr;   r#   r   r   r   floatre   r!   r!   r!   r"   r`      s   r`   )/rN   rf   abcr   r   collections.abcr   Zhttp.cookiesr   r   typingr   r   r	   r
   r   r   r   r   r   r   Z	multidictr   Zyarlr   Zhelpersr   Ztypedefsr   Zweb_appr   Zweb_exceptionsr   Zweb_requestr   r   Zweb_responser   r   r+   r<   r@   r;   ZIterableBaserF   rO   r`   r!   r!   r!   r"   <module>   s4   0,"