
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!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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 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 )zºPost 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 )z‡Freeze 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,"