HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/aiohttp/__pycache__/web.cpython-310.pyc
o

;j�G�)@sddlZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZddl
mZddlmZddlmZmZmZddlmZdd	lmZmZmZdd
lmZddlmZddlm Z m!Z!dd
l"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@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]ddl^m_Z_ddl`maZaddlbmcZcmdZdddlemfZfmgZgmhZhddlimjZjmkZkmlZlddlmmnZnmoZompZpmqZqmrZrddlsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZm�Z�m�Z�ddl�m�Z�m�Z�m�Z�m�Z�m�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�m�Z�ddl�m�Z�m�Z�m�Z�dZ�e�r�ddl�m�Z�nzddl�m�Z�Wne��y�e�Z�Ynwej�de]dd�ee�Z�ddddde�dddd�	d e e	e Bd!e�e�BdBd"e�dBd#eeeBdBd$ejeejBdBd%e�dBd&e
d'dBd(e�d)e�dBd*e�dBd+ed,dfd-d.�Z�d/e�d0d1ej�d,dfd2d3�Z�ddddd4d5de�deaeaj�edddd6dd7�d e e	e Bd!e�e�BdBd"e�dBd#eeeBdBd$ejeejBdBd8e�d9e�d%e�dBd&e
d'dBd(e�d:e�ed;e�d<ej�dBd=e�d)e�dBd*e�dBd>e�d1ej�dBd+ed,df(d?d@�Z�dAe�e�d,dfdBdC�Z�e�dDk�re�ej�dd��dSdS)E�N)�ArgumentParser)�	Awaitable�Callable�Iterabler)�suppress)�
import_module)�
TYPE_CHECKING�Any�cast�)�AbstractAccessLogger)�AppKey�
RequestKey�ResponseKey)�
access_logger)�PathLike)�Application�CleanupError);�HTTPAccepted�HTTPBadGateway�HTTPBadRequest�HTTPClientError�HTTPConflict�HTTPCreated�	HTTPError�
HTTPException�HTTPExpectationFailed�HTTPFailedDependency�
HTTPForbidden�	HTTPFound�HTTPGatewayTimeout�HTTPGone�HTTPInsufficientStorage�HTTPInternalServerError�HTTPLengthRequired�HTTPMethodNotAllowed�HTTPMisdirectedRequest�HTTPMove�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�NotAppKeyWarning)�FileResponse)�AccessLogger)�
middleware�normalize_path_middleware)�PayloadAccessError�RequestHandler�RequestPayloadError)�BaseRequest�	FileField�Request)�
ContentCoding�Response�StreamResponse�json_bytes_response�
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�PrefixedSubAppResource�Resource�
ResourceRoute�StaticResource�
UrlDispatcher�UrlMappingMatchInfo�View)�WebSocketReady�WebSocketResponse�	WSMsgType)ur
rrrNrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrOrQrRrSrTrUrVrWrXrrYrZr[r\r]rr^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorqrrrsrtrprurvrwrxryrzr{r|r}r~rr�r�r�r��run_app)�
SSLContext�ignoreT)�category�append�)	�host�port�path�sock�ssl_context�print�backlog�
reuse_address�
reuse_port�appr�r�r�r�r�r�).Nr�r�r��kwargs�returnc	�s��t�|�r|IdH}tt|�}t|fi|
��}|��IdHg}z�|durNt|t�r:|�t	|||||||	d��n-|D]}
|�t	||
|||||	d��q<n|durV|dusZ|durg|�t	||||||	d��|dur�t|tt
jf�r|�t||||d��n|D]
}|�t||||d��q�|dur�t|t
�s�|�t||||d��n|D]
}|�t||||d��q�|D]	}|��IdHq�|r�tdd�|jD��}|d�d�|���	t�d	�IdHq�|��IdHw)
N)r�r�r�r�)r�r�r�r�r�)r�r�css�|]}t|j�VqdS)N)�str�name)�.0�s�r��?/opt/saltstack/salt/lib/python3.10/site-packages/aiohttp/web.py�	<genexpr>�s�z_run_app.<locals>.<genexpr>z6======== Running on {} ========
(Press CTRL+C to quit)z, Ti)�asyncioZiscoroutiner
rrl�setup�
isinstancer�r�rs�osrrtrrr�start�sorted�sites�format�join�sleepZcleanup)r�r�r�r�r�r�r�r�r�r�r�Zrunnerr��h�pr��site�namesr�r�r��_run_app)s��



���������	��	
��	����r��	to_cancelzasyncio.Task[Any]�loopcCsj|sdS|D]}|��q|�tj|ddi��|D]}|��r!q|��dur2|�d|��|d��qdS)NZreturn_exceptionsTz1unhandled exception during asyncio.run() shutdown)�message�	exception�task)�cancel�run_until_completer�ZgatherZ	cancelledr�Zcall_exception_handler)r�r�r�r�r�r��
_cancel_tasks�s"
����r�gN@g�R@F)r�r�r�r��shutdown_timeout�keepalive_timeoutr�r�r��access_log_class�access_log_format�
access_log�handle_signalsr�r��handler_cancellationr�r�r�r�r�r�r�r�cKs�|durt��}|��r*|r*|jdkr*|jtjkr|�tj�|�	�s*|�
t���|�t
|fid|�d|�d|�d|�d|�d|�d	|�d
|�d|	�d|
�d
|�d|�d|
�d|�d|�d|�|���}z�zt�|�|�|�Wnttfy}YnwWzd|��s�|��ttj��
|�|�Wd�n41s�wYWtt�|�|�|�|���|��dSWtt�|�|�|�|���|��dSWtt�|�|�|�|���|��dStt�|�|�|�|���|��wzc|���s2|��ttj��
|�|�Wd�n31�swYWtt�|�|�|�|���|��wWtt�|�|�|�|���|��wWtt�|�|�|�|���|��wtt�|�|�|�|���|��w)zRun an app locallyNzaiohttp.accessr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r�Znew_event_loopZ	get_debugr��level�logging�NOTSET�setLevel�DEBUG�hasHandlers�
addHandler�
StreamHandlerZcreate_taskr�Zset_event_loopr�ro�KeyboardInterruptZdoner�rZCancelledErrorr�Z	all_tasksZshutdown_asyncgens�close)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Z	main_taskr�r�r�r��s���������	�
���
������
��	����
�
	 �
�
�
�
r��argvc

Cs�tddd�}|jdddd�|jdd	d
dd�|jdd
dtdd�|jdddd�|�|�\}}|j�d�\}}}|r=|sB|�d�|�d�rL|�d�zt|�}Wnt	yo}z|�d|�d|���WYd}~nd}~wwzt
||�}	Wnty�|�d|�d|���Ynw|jdur�t
td�s�|�d�tjtjd�|jr�|jdur�d}
}n|jp�d }
|j}|	|�}t||
||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
--hostnamez0TCP/IP hostname to serve on (default: localhost))r��defaultz-Pz--portz.TCP/IP port to serve on (default: %(default)r)i�)r��typer�z-Uz--pathz_Unix file system path to serve on. Can be combined with hostname to serve on both Unix and TCP.)r��:z,'entry-func' not in 'module:function' syntax�.z#relative module names not supportedzunable to import z: zmodule z has no attribute �AF_UNIXz=file system paths not supported by your operating environment)r�Z	localhost)r�r�r�zStopped
)r�)r�add_argument�int�parse_known_argsr��	partition�error�
startswithr�ImportError�getattr�AttributeErrorr��hasattr�socketr��basicConfigr��hostnamer�r��exit)
r�Z
arg_parser�argsZ
extra_argvZmod_str�_Zfunc_str�module�ex�funcr�r�r�r�r�r��main
sn�����


"����

r��__main__)�r�r�r�r��sys�warnings�argparser�collections.abcrrrZTypingIterable�
contextlibr�	importlibr�typingrr	r
�abcrZhelpersr
rr�logrZtypedefsrZweb_apprrZweb_exceptionsrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNZweb_fileresponserOZweb_logrPZweb_middlewaresrQrRZweb_protocolrSrTrUZweb_requestrVrWrXZweb_responserYrZr[r\r]Zweb_routedefr^r_r`rarbrcrdrerfrgrhrirjrkZ
web_runnerrlrmrnrorprqrrrsrtZ
web_serverruZweb_urldispatcherrvrwrxryrzr{r|r}r~rr�Zweb_wsr�r�r��__all__�sslr�r��object�filterwarningsr�ZHostSequencer�r��boolr��setZAbstractEventLoopr�Z
LOG_FORMAT�floatr��Loggerr��listr��__name__r�r�r�r�r��<module>s�=@,4
��
�
�����
�	�
���
�{��
��
�
������	�

���
��������
�Q
C�