ok

Mini Shell

Direktori : /opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/web.cpython-38.pyc

U

'�7`�E�@sXddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWddlXmYZYdd
lZm[Z[ddl\m]Z]m^Z^ddl_m`Z`maZambZbddlcmdZdmeZemfZfddlgmhZhmiZimjZjmkZkddllmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZymzZzddl{m|Z|m}Z}m~Z~mZm�Z�m�Z�m�Z�m�Z�m�Z�ddl�m�Z�ddl�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�ddl�m�Z�m�Z�m�Z�dZ�zddl�m�Z�Wne�k
�r�eZ�YnXee�Z�dddddde�de[e[j�edddd�eeeefeee�e�fee�ee�eeje�ee�e
de�eee�eej�e�ee�ee�dd�dd �Z�ed!ej�dd"�d#d$�Z�dddddde�de[e[j�edddd�eeeefeee�e�fee�ee�eeje�ee�e
de�eee�eej�e�ee�ee�dd�d%d&�Z�ee�dd'�d(d)�Z�e�d*k�rTe�ej�dd��dS)+�N)�ArgumentParser)�Iterable)�
import_module)
�Any�	Awaitable�Callabler�List�Optional�Set�Type�Union�cast�)�AbstractAccessLogger)�	all_tasks)�
access_logger)�Application�CleanupError)9�HTTPAccepted�HTTPBadGateway�HTTPBadRequest�HTTPClientError�HTTPConflict�HTTPCreated�	HTTPError�
HTTPException�HTTPExpectationFailed�HTTPFailedDependency�
HTTPForbidden�	HTTPFound�HTTPGatewayTimeout�HTTPGone�HTTPInsufficientStorage�HTTPInternalServerError�HTTPLengthRequired�HTTPMethodNotAllowed�HTTPMisdirectedRequest�HTTPMovedPermanently�HTTPMultipleChoices�!HTTPNetworkAuthenticationRequired�
HTTPNoContent�HTTPNonAuthoritativeInformation�HTTPNotAcceptable�HTTPNotExtended�HTTPNotFound�HTTPNotImplemented�HTTPNotModified�HTTPOk�HTTPPartialContent�HTTPPaymentRequired�HTTPPermanentRedirect�HTTPPreconditionFailed�HTTPPreconditionRequired�HTTPProxyAuthenticationRequired�HTTPRedirection�HTTPRequestEntityTooLarge�HTTPRequestHeaderFieldsTooLarge�HTTPRequestRangeNotSatisfiable�HTTPRequestTimeout�HTTPRequestURITooLong�HTTPResetContent�HTTPSeeOther�HTTPServerError�HTTPServiceUnavailable�HTTPSuccessful�HTTPTemporaryRedirect�HTTPTooManyRequests�HTTPUnauthorized�HTTPUnavailableForLegalReasons�HTTPUnprocessableEntity�HTTPUnsupportedMediaType�HTTPUpgradeRequired�HTTPUseProxy�HTTPVariantAlsoNegotiates�HTTPVersionNotSupported)�FileResponse)�AccessLogger)�
middleware�normalize_path_middleware)�PayloadAccessError�RequestHandler�RequestPayloadError)�BaseRequest�	FileField�Request)�
ContentCoding�Response�StreamResponse�
json_response)�AbstractRouteDef�RouteDef�
RouteTableDef�	StaticDef�delete�get�head�options�patch�post�put�route�static�view)	�	AppRunner�
BaseRunner�BaseSite�GracefulExit�
NamedPipeSite�ServerRunner�SockSite�TCPSite�UnixSite)�Server)
�AbstractResource�
AbstractRoute�DynamicResource�
PlainResource�Resource�
ResourceRoute�StaticResource�
UrlDispatcher�UrlMappingMatchInfo�View)�WebSocketReady�WebSocketResponse�	WSMsgType)nrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrnrorprqrmrrrsrtrurvrwrxryrzr{r|r}r~r�run_app)�
SSLContextgN@�T��host�port�path�sock�shutdown_timeout�ssl_context�print�backlog�access_log_class�access_log_format�
access_log�handle_signals�
reuse_address�
reuse_port).N)�appr�r�r�r�r�r�r�r�r�r�r�r�r�r��returnc
�s$t�|�r|IdH}tt|�}t|||	|
|d�}|��IdHg}�z�|dk	r�t|tt	t
tf�r�|�t
|||||||
|d��q�|D]"}|�t
|||||||
|d��q�n4|dkr�|dks�|dk	r�|�t
||||||
|d��|dk	�r:t|tt	t
tf��r|�t|||||d��n$|D]}|�t|||||d���q|dk	�r�t|t��sj|�t|||||d��n$|D]}|�t|||||d���qn|D]}|��IdH�q�|�r�tdd�|jD��}|d�d�|���tjd	k�r�tjd
k�r�d}nd}t�|�IdH�q�W5|��IdHXdS)
N)r�r�r�r�)r�r�r�r�r�)r�r�r�r�r�r�)r�r�r�css|]}t|j�VqdS)N)�str�name)�.0�s�r��>/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/web.py�	<genexpr>�sz_run_app.<locals>.<genexpr>z6======== Running on {} ========
(Press CTRL+C to quit)z, Zwin32)��ri)�asyncioZiscoroutiner
rriZsetupZcleanup�
isinstancer��bytes�	bytearray�
memoryview�appendrprqrro�start�sorted�sites�format�join�sys�platform�version_info�sleep)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Zrunnerr��h�pr�Zsite�namesZdelayr�r�r��_run_apps�


���
����
��
��

��
��	��r�zasyncio.Task[Any])�	to_cancel�loopr�cCsl|sdS|D]}|��q|�tj||dd���|D]0}|��rDq6|��dk	r6|�d|��|d��q6dS)NT)r�Zreturn_exceptionsz1unhandled exception during asyncio.run() shutdown)�message�	exception�task)Zcancel�run_until_completer�ZgatherZ	cancelledr�Zcall_exception_handler)r�r�r�r�r�r��
_cancel_tasks�s"
���r�cCs�t��}|��rL|rL|jdkrL|jtjkr6|�tj�|�	�sL|�
t���zXz:|�t||||||||||	|
|||
|d��}|�|�Wnttfk
r�YnXW5t|h|�tt
|�|�tjdkr�|�|���|��XdS)zRun an app locallyzaiohttp.access)r��r�N)r�Zget_event_loopZ	get_debugr��level�loggingZNOTSETZsetLevel�DEBUGZhasHandlersZ
addHandlerZ
StreamHandlerr�rr�r�r�Zshutdown_asyncgens�closeZcreate_taskr�rl�KeyboardInterrupt)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Z	main_taskr�r�r�r��sD��

r�)�argvr�c
Csxtddd�}|jdddd�|jdd	d
dd�|jd
ddtdd�|jdddd�|�|�\}}|j�d�\}}}|rz|s�|�d�|�d�r�|�d�zt|�}Wn8t	k
r�}z|�d|�d|���W5d}~XYnXzt
||�}	Wn,tk
�r|�d|�d|���YnX|jdk	�r<t
td��s<|�d�tjtjd �|	|�}
t|
|j|j|jd!�|jd"d#�dS)$Nzaiohttp.web Application serverzaiohttp.web)�description�prog�
entry_funczvCallable returning the `aiohttp.web.Application` instance to run. Should be specified in the 'module:function' syntax.z
entry-func)�help�metavarz-Hz
--hostnamez2TCP/IP hostname to serve on (default: %(default)r)Z	localhost)r��defaultz-Pz--portz.TCP/IP port to serve on (default: %(default)r)Z8080)r��typer�z-Uz--pathzjUnix file system path to serve on. Specifying a path will cause hostname and port arguments to be ignored.)r��:z,'entry-func' not in 'module:function' syntax�.z#relative module names not supportedzunable to import z: zmodule z has no attribute ZAF_UNIXz=file system paths not supported by your operating environment)r�)r�r�r�zStopped
)r�)r�add_argument�intZparse_known_argsr��	partition�error�
startswithr�ImportError�getattr�AttributeErrorr��hasattr�socketr�ZbasicConfigr�r�Zhostnamer��exit)r�Z
arg_parser�argsZ
extra_argvZmod_str�_Zfunc_str�moduleZex�funcr�r�r�r��mainsb�����


(�r��__main__)�r�r�r�r��argparserZcollections.abcr�	importlibr�typingrrrZTypingIterablerr	r
rrr
�abcrZhelpersr�logrZweb_apprrZweb_exceptionsrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLZweb_fileresponserMZweb_logrNZweb_middlewaresrOrPZweb_protocolrQrRrSZweb_requestrTrUrVZweb_responserWrXrYrZZweb_routedefr[r\r]r^r_r`rarbrcrdrerfrgrhZ
web_runnerrirjrkrlrmrnrorprqZ
web_serverrrZweb_urldispatcherrsrtrurvrwrxryrzr{r|Zweb_wsr}r~r�__all__Zsslr�r�r�ZHostSequencer�Z
LOG_FORMATr��floatZLogger�boolr�ZAbstractEventLoopr�r�r��__name__r�r�r�r�r��<module>s�0
�;@,0
�����;=


Zerion Mini Shell 1.0