Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/event/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/event/__pycache__/legacy.cpython-311.pyc

�

�܋f��B�dZddlmZdd�Zd�Zd�Zd�Zd�Zd	�Zd
�Z	dS)zhRoutines to handle adaption of legacy call signatures,
generation of deprecation notes and docstrings.

�)�utilNc��������fd�}|S)Nc�p��t|d��sg|_|j����f��|S)N�_legacy_signatures)�hasattrr�append)�fn�argnames�	converter�sinces ����N/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/event/legacy.py�legz_legacy_signature.<locals>.legsA����r�/�0�0�	'�$&�B�!�
��$�$�e�X�y�%A�B�B�B��	��)rr
rrs``` r
�_legacy_signaturers/�������������Jrc�
�������jD]u\}���ddkr
d��dd��nd�t���t|j��kr/�t|j��ur�r�rJ���fd�}n����fd�}|cS�v�S)N���z**kwT�Fc�����|��S�Nr)�args�convr	s ��r
�wrap_legz%_wrap_fn_for_legacy.<locals>.wrap_leg)s����2�t�t�T�{�+�+rc����tt�j|������fd��D��}�r�|i|��S�|�S)Nc� ��g|]
}�|��Srr)�.0�name�argdicts  �r
�
<listcomp>z9_wrap_fn_for_legacy.<locals>.wrap_leg.<locals>.<listcomp>0s���?�?�?�d�G�D�M�?�?�?r)�dict�zip�	arg_names)r�kwrr
�dispatch_collectionr	�has_kws  @����r
rz%_wrap_fn_for_legacy.<locals>.wrap_leg.s^����"�3�':�'D�d�#K�#K�L�L�G�?�?�?�?�h�?�?�?�D��)�!�r�4��2���.�!�r�4�y�(r)�legacy_signatures�lenr�bool�varkw)r$r	�argspecrrr
rr%s``   @@@r
�_wrap_fn_for_legacyr+s��������!4�!F�����x���B�<�6�!�!��F���"��~�H�H��F��x�=�=�C���-�-�-�-�&�D��M�=
�=
�3
�3
��
)�!�!�!�z�,�,�,�,�,�,�,�
)�)�)�)�)�)�)�)��O�O�O���	rc�l��d��fd�|�d��D����S)N�
c3�"�K�|]	}�|zV��
dSrr)r�line�indents  �r
�	<genexpr>z_indent.<locals>.<genexpr><s'�����@�@�t�V�d�]�@�@�@�@�@�@r)�join�split)�textr0s `r
�_indentr5;s6����9�9�@�@�@�@�t�z�z�$�/?�/?�@�@�@�@�@�@rc�z�td�d�|jdd�D����d��}|jrt	d�|jD����}nd}d}t|j��dkr|d	z
}||rd
|znd|j|jrdndd
�|j��||d�z}|S)Nr-c3�$K�|]}dd|izV��dS)z%(arg)s = kw['%(arg)s']�argNr)rr8s  r
r1z+_standard_listen_example.<locals>.<genexpr>As?����
�
��
&����4�
�
�
�
�
�
rrrz    c3�"K�|]
\}}}|V��dSrr)rrrrs    r
r1z+_standard_listen_example.<locals>.<genexpr>Hs<����
�
�!��t�T�
�
�
�
�
�
�
rafrom sqlalchemy import event

# standard decorator style%(current_since)s
@event.listens_for(%(sample_target)s, '%(event_name)s')
def receive_%(event_name)s(%(named_event_arguments)s%(has_kw_arguments)s):
    "listen for the '%(event_name)s' event"

    # ... (event handling logic) ...
�z�
# named argument style (new in 0.9)
@event.listens_for(%(sample_target)s, '%(event_name)s', named=True)
def receive_%(event_name)s(**kw):
    "listen for the '%(event_name)s' event"
%(example_kw_arg)s

    # ... (event handling logic) ...
z (arguments as of %s)��, **kw�, )�
current_since�
event_name�has_kw_arguments�named_event_arguments�example_kw_arg�
sample_target)r5r2r"r&�maxr'�__name__r%)r$rCr	rBr>r4s      r
�_standard_listen_examplerF?s%����	�	�
�
�*�4�Q�q�S�9�
�
�
�	
�	
�	���N��,���
�
�%8�%J�
�
�
�
�
�
�
�
�
�	3�	���(�)�)�A�-�-��
7�	
��	���0�=�@�@�
��k�(;�(B�J�H�H��!%���+>�+H�!I�!I�(�&�	
�	
�	�D��Krc	��d}|jD]5\}}}|d||j|jrdndd�|��|d�zz
}�6|S)Nr;a&
# DEPRECATED calling style (pre-%(since)s, will be removed in a future release)
@event.listens_for(%(sample_target)s, '%(event_name)s')
def receive_%(event_name)s(%(named_event_arguments)s%(has_kw_arguments)s):
    "listen for the '%(event_name)s' event"

    # ... (event handling logic) ...
z **kwr=)rr?r@rArC)r&rEr%r2)r$rCr	r4rrrs       r
�_legacy_listen_examplesrHpss��
�D�0�B�
�
���t�T��
7�� �k�&�-�%�G�G��)-���4���!.���
�	
���$�Krc��|jd\}}}d||j|jd�|j��|jrdndd�zS)Nra>
.. deprecated:: %(since)s
    The :class:`.%(clsname)s.%(event_name)s` event now accepts the 
    arguments ``%(named_event_arguments)s%(has_kw_arguments)s``.
    Support for listener functions which accept the previous 
    argument signature(s) listed above as "deprecated" will be 
    removed in a future release.r=r<r;)r�clsnamer?rAr@)r&rErr2r"r%)�parent_dispatch_clsr$rrrs     r
�_version_signature_changesrL�sb��+�=�a�@��E�4��	+��*�3�-�2�%)�Y�Y�/B�/L�%M�%M�,?�,F� N���B�
�
�
	
�rc��d}t|dd��}|tt|||��d��z}|jr5|tt	|||��d��z
}|t||��z
}t
j|j|d��S)Nz@.. container:: event_signatures

     Example argument forms::

�_target_class_doc�objz        �)	�getattrr5rFr&rHrLr�inject_docstring_text�__doc__)r$rKr	�headerrCr4s      r
�_augment_fn_docsrU�s���	
���/�1D�e�L�L�M��G� �!4�m�R�H�H�����D��,�
���#�$7���K�K��
�
�	
��
	
�*��!4�
�
�	
���%�b�j�$��:�:�:rr)
rSr;rrr+r5rFrHrLrUrrr
�<module>rVs�����
�������������BA�A�A�.�.�.�b���0���&;�;�;�;�;r

Hacked By AnonymousFox1.0, Coded By AnonymousFox