ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/jinja2/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/jinja2/__pycache__/asyncsupport.cpython-311.pyc

�

l��f)���dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZdd	lm
Z
dd
lmZd�Zd�Zd
�Zd�Zd�Zd�Zd�Ze
d���Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�ZGd�de
��Zd d�Z e��dS)!zWThe code for async support. Importing this patches Jinja on supported
Python versions.
�N��update_wrapper)�Markup�)�TemplateModule)�LoopContext��concat��internalcode)�missingc��X��K�g���fd�}|���d{V��t���S)Nc��L�K��23d{V��}��|���6dS�N)�append)�event�	async_gen�rvs ���s/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/asyncsupport.py�collectzconcat_async.<locals>.collectsM�����$�	�	�	�	�	�	�	�%��I�I�e�����%�9�9s�#r	)rrrs` @r�concat_asyncrsP������	�B��������'�)�)�O�O�O�O�O�O�O��"�:�:��c��K�t|i|��}	|�|�|����23d{V��}|WV��
6dS#t$r |j���WV�YdSwxYwr)�dict�root_render_func�new_context�	Exception�environment�handle_exception)�self�args�kwargs�varsrs     r�generate_asyncr$s������� �� � �D�2��0�0��1A�1A�$�1G�1G�H�H�	�	�	�	�	�	�	�%��K�K�K�K�K�I�H�H���2�2�2���/�/�1�1�1�1�1�1�1�1�1�2���s�(A�A�A�&A2�1A2c�8���d����fd�}t|���S)Nc3�K�|j|i|��}		|�|�����V��*#t$rYdSwxYwr)r$�run_until_complete�	__anext__�StopAsyncIteration)r �loopr!r"rs     r�_convert_generatorz.wrap_generate_func.<locals>._convert_generator'sv����'�D�'��8��8�8�	�	�
E��-�-�i�.A�.A�.C�.C�D�D�D�D�D�
E��!�	�	�	��D�D�	���s�+<�
A
�	A
c�r��|jjs�|g|�Ri|��S�|tj��||��Sr)r�is_async�asyncio�get_event_loop)r r!r"r+�original_generates   ��r�generatez$wrap_generate_func.<locals>.generate/sR�����(�	<�$�$�T�;�D�;�;�;�F�;�;�;�!�!�$��(>�(@�(@�$��O�O�Orr)r0r1r+s` @r�wrap_generate_funcr2&sJ�������P�P�P�P�P�P�
�(�$5�6�6�6rc��"K�|jjstd���t|i|��}|�|��}	t|�|�����d{V��S#t$r|j���cYSwxYw)Nz8The environment was not created with async mode enabled.)	rr-�RuntimeErrorrrrrrr)r r!r"r#�ctxs     r�render_asyncr67s�������$�W��U�V�V�V��� �� � �D�
�
�
�4�
 �
 �C�3�!�$�"7�"7��"<�"<�=�=�=�=�=�=�=�=�=���3�3�3���0�0�2�2�2�2�2�3���s�'A(�(#B�
Bc�.���fd�}t|���S)Nc���|jjs�|g|�Ri|��Stj��}|�|j|i|����Sr)rr-r.r/r'r6)r r!r"r*�original_renders    �r�renderz wrap_render_func.<locals>.renderEsf�����(�	:�"�?�4�9�$�9�9�9�&�9�9�9��%�'�'���&�&�'8�t�'8�$�'I�&�'I�'I�J�J�Jrr)r9r:s` r�wrap_render_funcr;Ds3���K�K�K�K�K��&�/�2�2�2rc�l���td����t��fd���}t|���S)Nc��K�t|j|j|j�����d{V��}|jjjrt
|��}|Sr)r�_stack�_depth�_context�eval_ctx�
autoescaper�r rs  r�
async_callz-wrap_block_reference_call.<locals>.async_callOs[����� 8���D�K� 8��� G� G�H�H�
H�
H�
H�
H�
H�
H���=�!�,�	�����B��	rc�R��|jjjs�|��S�|��Sr)r@rr-)r rD�
original_calls ��r�__call__z+wrap_block_reference_call.<locals>.__call__Vs3����}�(�1�	'� �=��&�&�&��z�$���r�rr)rFrGrDs` @r�wrap_block_reference_callrINsY��������\��� � � � � ��\� �
�(�M�2�2�2rc�l���td����t��fd���}t|���S)Nc��LK�|j|��d{V��}|rt|��}|Sr)�_funcr)r �	argumentsrBrs    r�async_invokez'wrap_macro_invoke.<locals>.async_invoke`s>�����4�:�y�)�
)�
)�
)�
)�
)�
)���	�����B��	rc�P��|jjs
�|||��S�|||��Sr)�_environmentr-)r rMrBrN�original_invokes   ��r�_invokez"wrap_macro_invoke.<locals>._invokegs:���� �)�	@�"�?�4��J�?�?�?��|�D�)�Z�8�8�8rrH)rQrRrNs` @r�wrap_macro_invokerS_sY��������\���9�9�9�9�9��\�9�
�'�?�3�3�3rc��hK�|j�|jS|����d{V��x|_}|Sr)�_module�make_module_asyncrCs  r�get_default_module_asyncrWpsE�����|���|��"�4�4�6�6�6�6�6�6�6�6�6�D�L�2�
�Irc�,��t�fd���}|S)Nc�P��|jjrtd����|��S)Nz6Template module attribute is unavailable in async mode)rr-r4)r �original_default_modules �r�_get_default_modulez0wrap_default_module.<locals>._get_default_moduleys2�����$�	Y��W�X�X�X�&�&�t�,�,�,rr)rZr[s` r�wrap_default_moduler\xs.����-�-�-�-��\�-�
�rFc��K�|�|||��}g}|�|��23d{V��}|�|���6t|||��Sr)rrrr)r r#�shared�locals�context�body_stream�items       rrVrV�s��������t�V�V�4�4�G��K��+�+�G�4�4�!�!�!�!�!�!�!�d����4� � � � �5��$���5�5�5s�Ac�z�ddlm}t|j��|_t	t
|j��|_t	t|j��|_t|j��|_t|j
��|_
t|_t	t|j
��|_
dS)Nr��Template)�rer2r1rr$r6r;r:r\r[rW�_get_default_module_asyncrVrds r�patch_templaterh�s���������*�8�+<�=�=�H��,�^�X�=T�U�U�H��*�<��9N�O�O�H��&�x��7�7�H�O�#6�x�7S�#T�#T�H� �)A�H�&�!/��8�5�"�"�H���rc�z�ddlm}m}t|j��|_t|j��|_dS)Nr��BlockReference�Macro)�runtimerkrlrIrGrSrRrjs  r�
patch_runtimern�sB��.�.�.�.�.�.�.�.�7��8O�P�P�N��%�e�m�4�4�E�M�M�Mrc�H�ddlm}ddlm}|�|��dS)Nr)�FILTERS)�
ASYNC_FILTERS)�filtersrp�asyncfiltersrq�update)rprqs  r�
patch_filtersru�s>�� � � � � � �+�+�+�+�+�+��N�N�=�!�!�!�!�!rc�Z�t��t��t��dSr)rhrnru�rr�	patch_allrx�s$�������O�O�O��O�O�O�O�Orc��BK�tj|��r|�d{V��S|Sr)�inspect�isawaitable)�values r�
auto_awaitr}�s0������5�!�!���{�{�{�{�{�{���Lrc�bK�t|d��r|23d{V��}|WV��
6dS|D]}|WV��dS)N�	__aiter__)�hasattr)�iterablerbs  r�
auto_aiterr��s}�����x��%�%��"�	�	�	�	�	�	�	�$��J�J�J�J�J�#��������
�
�
�
�
��s�"c��eZdZee��Zed���Zed���Zed���Z	d�Z
ed���Zed���Zd�Z
d�Zd	S)
�AsyncLoopContextc��>K�|j�|jS	t|j��|_nl#t$r_d�|j2���d{V��}|�|��|_t|��|jz|jtuz|_YnwxYw|jS)Nc��"K�g|3d{V��}|��
6Srrw)�.0�xs  r�
<listcomp>z+AsyncLoopContext.length.<locals>.<listcomp>�s.����8�8�8�8�8�8�8�8�A��8�8�8�8s�)	�_length�len�	_iterable�	TypeError�	_iterator�_to_iterator�index�_afterr
)r r�s  r�lengthzAsyncLoopContext.length�s������<�#��<��	U��t�~�.�.�D�L�L���	U�	U�	U�8�8���8�8�8�8�8�8�8�8�8�H�!�.�.�x�8�8�D�N��x�=�=�4�:�5���G�9S�T�D�L�L�L�	U����
�|�s�,�A&B�Bc��0K�|j�d{V��|jz
Sr)r�r��r s r�	revindex0zAsyncLoopContext.revindex0�s'�����[� � � � � � �4�:�-�-rc��0K�|j�d{V��|jz
Sr)r��index0r�s r�revindexzAsyncLoopContext.revindex�s'�����[� � � � � � �4�;�.�.rc���K�|jtur|jS	|j����d{V��|_n#t$rt|_YnwxYw|jSr)r�r
r�r(r)r�s r�
_peek_nextzAsyncLoopContext._peek_next�sy�����;�g�%�%��;��	"� $�� 8� 8� :� :�:�:�:�:�:�:�D�K�K��!�	"�	"�	"�!�D�K�K�K�	"�����{�s�$>�A�Ac��HK�|����d{V��tuSr)r�r
r�s r�lastzAsyncLoopContext.last�s-�����_�_�&�&�&�&�&�&�&�&�'�1�1rc��zK�|����d{V��}|tur|�d��S|S)Nzthere is no next item)r�r
�
_undefinedrCs  r�nextitemzAsyncLoopContext.nextitem�sH�����?�?�$�$�
$�
$�
$�
$�
$�
$��
��=�=��?�?�#:�;�;�;��	rc��|Srrwr�s rrzAsyncLoopContext.__aiter__�s���rc���K�|jtur|j}t|_n|j����d{V��}|xjdz
c_|j|_||_||fS)Nr)r�r
r�r(r��_current�_beforerCs  rr(zAsyncLoopContext.__anext__�sq�����;�g�%�%���B�!�D�K�K��~�/�/�1�1�1�1�1�1�1�1�B����q�����}�����
��4�x�rN)�__name__�
__module__�__qualname__�staticmethodr�r��propertyr�r�r�r�r�r�rr(rwrrr�r��s��������<�
�+�+�L�
����X���.�.��X�.��/�/��X�/�	�	�	��2�2��X�2�����X�����
�
�
�
�
rr�c��lK�ddl}|�dtd���t||||��S)NrzRThis template must be recompiled with at least Jinja 2.11, or it will fail in 3.0.�)�
stacklevel)�warnings�warn�DeprecationWarningr�)r��	undefined�recurse�depth0r�s     r�make_async_loop_contextr��sK�����O�O�O��M�M�	 ���	�����H�i��&�A�A�Ar)NFN)Nr)!�__doc__r.rz�	functoolsr�
markupsaferrrrmr�utilsr
rr
rr$r2r6r;rIrSrWr\rVrhrnrurxr}r�r�r�rwrr�<module>r�s�������������$�$�$�$�$�$�������'�'�'�'�'�'� � � � � � ����������������������2�2�2�7�7�7�"
3�
3�
3�3�3�3�3�3�3�"4�4�4�"���������6�6�6�6����5�5�5�"�"�"����������>�>�>�>�>�{�>�>�>�B	B�	B�	B�	B�
�	�����r

Zerion Mini Shell 1.0