ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp/__pycache__/web.cpython-311.pyc

�

�܋f?K�'��ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZmZmZm	ZmZmZmZmZmZmZddlmZd	d
lmZd	dlm Z d	dl!m"Z"d	d
l#m$Z$d	dl%m&Z&m'Z'd	dl(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]m^Z^m_Z_m`Z`maZambZbmcZcd	dldmeZed	dlfmgZgd	dlhmiZimjZjd	dlkmlZlmmZmmnZnd	dlompZpmqZqmrZrd	dlsmtZtmuZumvZvmwZwd	dlxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZm�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�d	dl�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�d	dl�m�Z�d	dl�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z�d	dl�m�Z�m�Z�m�Z�dZ�	ddl�m�Z�n
#e�$reZ�YnwxYwej�decd���ee�Z�ddddd d!de�d"egegj�e"dddd#d$�d%ee&ee&fd&eee�e�fd'ee�d(ee$ee$dfd)eeejeejfd*e�d+e�d,ee�d-eed.d/e�d0eed1e�d2eej�d3e�d4ee�d5ee�d6e�d7df$d8�Z�d9ed:d;ej�d7dfd<�Z�ddddd d!de�d"egegj�e"dddd#dd=�d%ee&ee&fd&eee�e�fd'ee�d(ee$ee$dfd)eeejeejfd*e�d+e�d,ee�d-eed.d/e�d0eed1e�d2eej�d3e�d4ee�d5ee�d6e�d;eej�d7df&d>�Z�d?ee�d7dfd@�Z�e�dAkre�ej�d	d���dSdS)B�N)�ArgumentParser)�Iterable)�suppress)�partial)�
import_module)
�Any�	Awaitable�Callabler�List�Optional�Set�Type�Union�cast)�WeakSet�)�AbstractAccessLogger)�AppKey)�
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_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)rrrrrSrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrTrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrurvrwrxrtryrzr{r|r}r~rr�r�r�r�r�r�r�r��run_app)�
SSLContext�ignoreT)�category�appendgN@g�R@�F)�host�port�path�sock�shutdown_timeout�keepalive_timeout�ssl_context�print�backlog�access_log_class�access_log_format�
access_log�handle_signals�
reuse_address�
reuse_port�handler_cancellation�appr�r�r�r�r�r�r�r�).Nr�r�r�r�r�r�r�r��returnc����K�dddtddf�fd�}dd��tj|��r|�d{V��}tt|��}t||
|
|||||���}|����d{V��ttj����}t|||��|_
g}	|��t|ttttf��r*|�t#|||||	||�	����n]|D]+}|�t#|||||	||�	�����,n.|�|�|�(|�t#||||	||�
����|�st|tt$jf��r'|�t)||||	�����n+|D](}|�t)||||	������)|�gt|t*��s'|�t-||||	�����n+|D](}|�t-||||	������)|D]}|����d{V���|rOt1d�|jD����}|d
�d�|������	tjd���d{V���#|����d{V��wxYw)N�starting_tasks�WeakSet[asyncio.Task[object]]r�r�c���K�tj��}|�J�|�|��ttj��5tj�|��|����d{V��ddd��dS#1swxYwYdS)N)�timeout)�asyncio�current_task�addr�TimeoutError�wait_for)r�r��t�_waits   ��B/opt/cloudlinux/venv/lib64/python3.11/site-packages/aiohttp/web.py�waitz_run_app.<locals>.waitCs������
� �"�"���}�}�}����1����
�g�*�
+�
+�	T�	T��"�5�5��#8�#8�BR�S�S�S�S�S�S�S�S�S�S�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T����	T�	T�	T�	T�	T�	Ts�	&A<�<B�B�excludec��:K�tj��}|�J�|�|��tj���|��x}rDtj|���d{V��tj���|��x}�BdSdS�N)r�r�r��	all_tasks�
differencer�)r�r��taskss   r�r�z_run_app.<locals>._waitMs������ �"�"���}�}�}����A�����(�*�*�5�5�g�>�>�>�e�	&��,�u�%�%�%�%�%�%�%�%�%��(�*�*�5�5�g�>�>�>�e�	&�	&�	&�	&�	&�)r�r�r�r�r�r�r�)r�r�r�r�)r�r�r�r�r�)r�r�c3�>K�|]}t|j��V��dSr�)�str�name)�.0�ss  r��	<genexpr>z_run_app.<locals>.<genexpr>�s*����=�=�1�3�q�v�;�;�=�=�=�=�=�=r�z6======== Running on {} ========
(Press CTRL+C to quit)z, Ti)r�r�r�N)�floatr��iscoroutinerrrp�setuprr�r�shutdown_callback�
isinstancer��bytes�	bytearray�
memoryviewr�rw�osrrxrrv�start�sorted�sites�format�join�sleep�cleanup)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��runnerr�r��h�pr��site�namesr�s                          @r��_run_appr�/s>�����(T�7�T�KP�T�	
�T�T�T�T�T�T�&�&�&�&���3�����i�i�i�i�i�i��
�{�C�
 �
 �C�
��%�)�+��+�)�1�	�	�	�F��,�,�.�.��������
7>�g�>O�>Q�>Q�6R�6R�N�&�t�^�=M�N�N�F���E�^����$��e�Y�
� C�D�D�
��������$/� '�&3�#-����
�
�
�
����A��L�L��"�� �(3�$+�*7�'1����
�
�
�
���\�d�l�d�.>��L�L���� +�#�"/�)�
���	
�	
�	
����$��b�k� 2�3�3�
�������$/� '�	����������A��L�L� �"��(3�$+�	����������d�H�-�-�
�������$/� '�	����������A��L�L� �"��(3�$+�	��������	�	�D��*�*�,�,����������	��=�=���=�=�=�=�=�E��E�)�)/���	�	�%�0@�0@�)A�)A�
�
�
�	&��-��%�%�%�%�%�%�%�%�%�	&���n�n�������������s
�4HK�K+�	to_cancelzasyncio.Task[Any]�loopc�:�|sdS|D]}|����|�tj|ddi���|D]V}|���r�|����+|�d|���|d����WdS)N�return_exceptionsTz1unhandled exception during asyncio.run() shutdown)�message�	exception�task)�cancel�run_until_completer��gather�	cancelledr��call_exception_handler)r�r�r�s   r��
_cancel_tasksr��s��������������
�
�
�
����G�N�I�N��N�N�O�O�O��
�
���>�>���	���>�>���'��'�'�R�!%���!1�!1� ���
�
�
��	
�
r�)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�c�0�|�tj��}|���r{|ry|jdkrn|jt
jkr|�t
j��|�	��s&|�
tj����|�t|fid|�d|�d|�d|�d|�d|�d	|�d
|�d|	�d|
�d
|�d|�d|
�d|�d|�d|����}	tj|��|�|��n#t t"f$rYnwxYwt%|h|��t%tj|��|��|�|�����|���dS#t%|h|��t%tj|��|��|�|�����|���wxYw)zRun an app locallyNzaiohttp.accessr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r��new_event_loop�	get_debugr��level�logging�NOTSET�setLevel�DEBUG�hasHandlers�
addHandler�
StreamHandler�create_taskr��set_event_loopr�rs�KeyboardInterruptr�r��shutdown_asyncgens�close)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��	main_tasks                   r�r�r��s���,�|��%�'�'���~�~���;�J�;�:�?�>N�+N�+N���w�~�-�-�����
�.�.�.��%�%�'�'�	;��!�!�'�"7�"9�"9�:�:�:�� � ���	
�	
�	
���	
���	
���		
�
��	
�.�-�
	
�0�/�	
�$��	
��%�	
��G�	
�.�-�	
�0�/�	
�"�z�	
�*�>�	
�(�-�	
� "�z�!	
�""6�!5�#	
���I�,	���t�$�$�$����	�*�*�*�*���+�,�
�
�
���
����	�y�k�4�(�(�(��g�'��-�-�t�4�4�4����� 7� 7� 9� 9�:�:�:��
�
�������	�y�k�4�(�(�(��g�'��-�-�t�4�4�4����� 7� 7� 9� 9�:�:�:��
�
�������s+�4)D�F%�D2�/F%�1D2�2F%�%A0H�argvc��tdd���}|�ddd���|�dd	d
d���|�d
ddtd���|�ddd���|�|��\}}|j�d��\}}}|r|s|�d��|�d��r|�d��	t|��}n2#t$r%}|�d|�d|����Yd}~nd}~wwxYw	t||��}	n+#t$r|�d|�d|����YnwxYw|j�*ttd��s|�d��tjtj� ��|	|��}
t%|
|j|j|j�!��|�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)�	localhost)r��defaultz-Pz--portz.TCP/IP port to serve on (default: %(default)r)�8080)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 �AF_UNIXz=file system paths not supported by your operating environment)r�)r�r�r�zStopped
)r�)r�add_argument�int�parse_known_argsr��	partition�error�
startswithr�ImportError�getattr�AttributeErrorr��hasattr�socketr��basicConfigr�r��hostnamer��exit)r��
arg_parser�args�
extra_argv�mod_str�_�func_str�module�ex�funcr�s           r��mainr*s����4�=����J�����
H��
���������
A��	���������
=�
�����������5�����"�2�2�4�8�8��D�*� �?�4�4�S�9�9��G�Q���I�7�I����G�H�H�H����#���@����>�?�?�?�>��w�'�'�����>�>�>����<�W�<�<��<�<�=�=�=�=�=�=�=�=�����>����N��v�x�(�(�����N�N�N����L�7�L�L��L�L�M�M�M�M�M�N�����y��W�V�Y�%?�%?�����N�	
�	
�	
���g�m�,�,�,�,�
�$�z�
�
�C��C�d�m�$�)�$�)�D�D�D�D��O�O�K�O�(�(�(�(�(s*�4D�
D3�D.�.D3�7E�%E0�/E0�__main__)�r�r�r�r�sys�warnings�argparser�collections.abcr�
contextlibr�	functoolsr�	importlibr�typingrr	r
�TypingIterablerrr
rrr�weakrefr�abcr�helpersr�logr�typedefsr�web_apprr�web_exceptionsrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrS�web_fileresponserT�web_logrU�web_middlewaresrVrW�web_protocolrXrYrZ�web_requestr[r\r]�web_responser^r_r`ra�web_routedefrbrcrdrerfrgrhrirjrkrlrmrnro�
web_runnerrprqrrrsrtrurvrwrx�
web_serverry�web_urldispatcherrzr{r|r}r~rr�r�r�r�r��web_wsr�r�r��__all__�sslr�r�filterwarningsr��HostSequencer��
LOG_FORMATr�r��Logger�boolr��AbstractEventLoopr�r�r�__name__r��r�r��<module>r;s�
����������	�	�	�	�
�
�
�
�
�
�
�
�����#�#�#�#�#�#�$�$�$�$�$�$�������������#�#�#�#�#�#�������������������������������%�%�%�%�%�%�%�%�%�%�%�%�������������M�M�M�M�M�M�M�M�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�z;�:�:�:�:�:�!�!�!�!�!�!�������������������
����������
�������������������������������������������� 
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�)�(�(�(�(�(�������������������������������������@��F��������������J�J�J���������+;�D�I�I�I�I��c�"��04��<@�JN�"�#�(,�+0��3?�)�4�+8��$(�!%�!&�%^�^�^�	�{�I�k�2�2�	3�^��5��l�*�+�
,�^��3�-�	^�
��.��2�D�8�
9�^��5����v�}�(E�E�F�
G�
^��^��^��*�%�^��H�Y�'�(�^��^��/�0�^��^����(�^��^� �D�>�!^�"���#^�$�%^�&
�'^�^�^�^�B��&�'��/6�/H��	�����604��<@�JN�"�#�(,�+0��3?�)�4�+8��$(�!%�!&�04�'?�?�?�	�{�I�k�2�2�	3�?��5��l�*�+�
,�?��3�-�	?�
��.��2�D�8�
9�?��5����v�}�(E�E�F�
G�
?��?��?��*�%�?��H�Y�'�(�?��?��/�0�?��?����(�?��?� �D�>�!?�"���#?�$�%?�&�7�,�
-�'?�(
�)?�?�?�?�D:)�t�C�y�:)�T�:)�:)�:)�:)�z�z����D���!�"�"��������s�F
�
F�F

Zerion Mini Shell 1.0