HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/aiohttp/__pycache__/abc.cpython-310.pyc
o

���gp�@s�ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZddlmZddlmZdd	lmZe
rqdd
lm Z ddl!m"Z"ddl#m$Z$m%Z%dd
l&m'Z'n
dZ$Z%Z Z'dZ"Gdd�de�Z(Gdd�de�Z)Gdd�de�Z*Gdd�de�Z+Gdd�de�Z,e
r�eee-Z.neZ.edge/fZ0Gdd�dee.�Z1Gdd�de�Z2Gdd�de�Z3dS)�N)�ABC�abstractmethod)�Sized)�
BaseCookie�Morsel)�
TYPE_CHECKING�Any�	Awaitable�Callable�Dict�	Generator�Iterable�List�Optional�Tuple�	TypedDict�Union)�CIMultiDict)�URL�)�LooseCookies)�Application)�
HTTPException)�BaseRequest�Request)�StreamResponsec@sZeZdZddd�Zdeddfdd�Zedefdd	��Zdd
d�Z	e
dedd
fdd��ZdS)�AbstractRouter�returnNcCs
d|_dS)NF��_frozen��self�r"�6/usr/local/lib/python3.10/dist-packages/aiohttp/abc.py�__init__'�
zAbstractRouter.__init__�appcC�dS)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*�zAbstractRouter.post_initcC�|jS�Nrr r"r"r#�frozen2szAbstractRouter.frozencCs
d|_dS)zFreeze router.TNrr r"r"r#�freeze6s
zAbstractRouter.freeze�request�AbstractMatchInfoc���dS)z#Return MATCH_INFO for given requestNr"�r!r/r"r"r#�resolve:�zAbstractRouter.resolve�rN)
�__name__�
__module__�__qualname__r$rr)�property�boolr-r.rrr3r"r"r"r#r&s

rc@s�eZdZdZeedeegee	ffdd���Z
eedeegeee	ffdd���Zeedee
fdd���Zedeeeffd	d
��Zeedeedffdd
���Zededdfdd��Zeddd��ZdS)r0r"rcCr')zExecute matched request handlerNr"r r"r"r#�handlerCr*zAbstractMatchInfo.handlercCr')z*Expect handler for 100-continue processingNr"r r"r"r#�expect_handlerHr*z AbstractMatchInfo.expect_handlercCr')z<HTTPException instance raised on router's resolving, or NoneNr"r r"r"r#�http_exceptionOr*z AbstractMatchInfo.http_exceptioncCr')z;Return a dict with additional info useful for introspectionNr"r r"r"r#�get_infoTr*zAbstractMatchInfo.get_info.cCr')z\Stack of nested applications.

        Top level application is left-most element.

        Nr"r r"r"r#�appsXr*zAbstractMatchInfo.appsr&NcCr')z)Add application to the nested apps stack.Nr"r(r"r"r#�add_appar*zAbstractMatchInfo.add_appcCr')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.er*zAbstractMatchInfo.freezer5)r6r7r8�	__slots__r9rr
rr	rr;rr<rr=r�strrr>rrr?r@r.r"r"r"r#r0?s, �r0c@sPeZdZdZdeddfdd�Zedefdd��Zede	e
deffd	d
��ZdS)�AbstractViewzAbstract class based view.r/rNcCs
||_dSr,��_requestr2r"r"r#r$sr%zAbstractView.__init__cCr+)zRequest instance.rDr r"r"r#r/vszAbstractView.requestcCr')zExecute the view handler.Nr"r r"r"r#�	__await__{r*zAbstractView.__await__)
r6r7r8�__doc__rr$r9r/rrrrrFr"r"r"r#rCpsrCc@sBeZdZUdZeed<eed<eed<eed<eed<eed<dS)	�
ResolveResulta�Resolve result.

    This is the result returned from an AbstractResolver's
    resolve method.

    :param hostname: The hostname that was provided.
    :param host: The IP address that was resolved.
    :param port: The port that was resolved.
    :param family: The address family that was resolved.
    :param proto: The protocol that was resolved.
    :param flags: The flags that were resolved.
    �hostname�host�port�family�proto�flagsN)r6r7r8rGrB�__annotations__�intr"r"r"r#rH�s

rHc@sJeZdZdZedejfdededej	de
efdd��Zedd
d��Z
d	S)
�AbstractResolverzAbstract DNS resolver.rrJrKrLrc�r1)z$Return IP address for given hostnameNr")r!rJrKrLr"r"r#r3�r4zAbstractResolver.resolveNc�r1)zRelease resolverNr"r r"r"r#�close�r4zAbstractResolver.closer5)r6r7r8rGr�socket�AF_INETrBrP�
AddressFamilyrrHr3rRr"r"r"r#rQ�s�����rQzMorsel[str]c@s�eZdZdZdd�deejddfdd�Zee	de
fdd	���Ze	dd
eeddfdd��Z
e	d
eddfdd��Ze	e�fdededdfdd��Ze	deddfdd��ZdS)�AbstractCookieJarzAbstract Cookie Jar.N)�looprWrcCs|pt��|_dSr,)�asyncio�get_running_loop�_loop)r!rWr"r"r#r$�szAbstractCookieJar.__init__cCr')z(Return True if cookies should be quoted.Nr"r r"r"r#�quote_cookie�r*zAbstractCookieJar.quote_cookie�	predicatecCr')z,Clear all cookies if no predicate is passed.Nr")r!r\r"r"r#�clear�r*zAbstractCookieJar.clear�domaincCr')z0Clear all cookies for domain and all subdomains.Nr")r!r^r"r"r#�clear_domain�r*zAbstractCookieJar.clear_domain�cookies�response_urlcCr')zUpdate cookies.Nr")r!r`rar"r"r#�update_cookies�r*z AbstractCookieJar.update_cookies�request_urlzBaseCookie[str]cCr')z6Return the jar's cookies filtered by their attributes.Nr")r!rcr"r"r#�filter_cookies�r*z AbstractCookieJar.filter_cookiesr,)r6r7r8rGrrX�AbstractEventLoopr$r9rr:r[�ClearCookiePredicater]rBr_rrrbrdr"r"r"r#rV�srVc@s�eZdZUdZdZeed<dZeed<dZe	eed<e
deee
efddfd	d
��Ze
ddeddfdd
��Ze
ddd��Ze
dejfdededdfdd��Ze
ddd��Ze
deddddfdd��ZdS)�AbstractStreamWriterzAbstract stream writer.r�buffer_size�output_size�length�chunkrNc�r1)zWrite chunk into stream.Nr"�r!rkr"r"r#�write�r4zAbstractStreamWriter.write�c�r1)zWrite last chunk.Nr"rlr"r"r#�	write_eof�r4zAbstractStreamWriter.write_eofc�r1)zFlush the write buffer.Nr"r r"r"r#�drain�r4zAbstractStreamWriter.drain�deflate�encoding�strategycCr')zEnable HTTP body compressionNr")r!rrrsr"r"r#�enable_compression�r*z'AbstractStreamWriter.enable_compressioncCr')zEnable HTTP chunked modeNr"r r"r"r#�enable_chunking�r*z$AbstractStreamWriter.enable_chunking�status_line�headerszCIMultiDict[str]c�r1)zWrite HTTP headersNr")r!rvrwr"r"r#�
write_headers�r4z"AbstractStreamWriter.write_headers)rnr5)r6r7r8rGrhrPrOrirjrrr�bytes�	bytearray�
memoryviewrmrorp�zlib�Z_DEFAULT_STRATEGYrBrtrurxr"r"r"r#rg�s<
�������rgc	@s\eZdZdZdZdejdeddfdd�Ze	d	e
d
ededdfdd
��Z
edefdd��ZdS)�AbstractAccessLoggerzAbstract writer to access log.��logger�
log_formatr�r�rNcCs||_||_dSr,r)r!r�r�r"r"r#r$�s
zAbstractAccessLogger.__init__r/�response�timecCr')zEmit log to logger.Nr")r!r/r�r�r"r"r#�log�r*zAbstractAccessLogger.logcCr')zCheck if logger is enabled.Tr"r r"r"r#�enabled�szAbstractAccessLogger.enabled)r6r7r8rGrA�logging�LoggerrBr$rrr�floatr�r9r:r�r"r"r"r#r~�sr~)4rXr�rSr|�abcrr�collections.abcr�http.cookiesrr�typingrrr	r
rrr
rrrrr�	multidictr�yarlr�typedefsr�web_appr�web_exceptionsr�web_requestrr�web_responserrr0rCrHrQrB�IterableBaser:rfrVrgr~r"r"r"r#�<module>s<81$