Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
util.cpython-313.pyc42 linesDownload Raw Back to __pycache__
1�

2��j���2�SSKJr SSKrSSKJr SSKJr SSKJr SSKJr SSKJr SS	KJ	r	 SS3K4Jr SSKJ
r
 SSKJr \R(d\(d
S
SKJr S
SKJr OSSKJr SSKJr \"S\/\4S9rSSjr"SS\
5r"SS5rg)�)�annotationsN)�Any)�Callable)�Optional)�TypeVar�)�exc)�util)�HAS_CYEXTENSION)�Protocol)�Self�)�_distill_params_20)�_distill_raw_params�_C)�boundc�:^�[RU4Sj5nU$)z�Decorator, memoize a function in a connection.info stash.5 6Only applicable to functions which take no arguments other than a7connection.  The memo will be stored in ``connection.info[key]``.8c�>�UR5nURT$![a U"X5=URT'nUs$f=f�N)�connect�info�KeyError)�fn�self�9connection�val�keys    ��\D:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/engine/util.py�	decorated�%connection_memoize.<locals>.decorated+sQ����'�'�)�10�	��?�?�3�'�'���	�)+�D�)=�=�J�O�O�C� �3��J�	�s�"�#A�A)r11�	decorator)rrs` r�connection_memoizer"$s#���12�^�^������c� �\rSrSr%S\S'Srg)�
_TConsSubject�7zOptional[TransactionalContext]�_trans_context_manager�N)�__name__�13__module__�__qualname__�__firstlineno__�__annotations__�__static_attributes__r(r#rr%r%7s��:�:r#r%c��\rSrSr%SrSrS\S'SSjrSSjrSSjr	SS	jr14SS15jrSSjrSSjr
\SS
j5rSSjrSSjrSrg)�TransactionalContext�;z�Apply Python context manager behavior to transaction objects.16 17Performs validation to ensure the subject of the transaction is not18used if the transaction were ended prematurely.19 20)�_outer_trans_ctx�_trans_subject�__weakref__zOptional[_TConsSubject]r3c��[5er��NotImplementedError�rs r�_transaction_is_active�+TransactionalContext._transaction_is_activeG���!�#�#r#c��[5err6r8s r�_transaction_is_closed�+TransactionalContext._transaction_is_closedJr;r#c��[5e)a�indicates the object is in a state that is known to be acceptable21for rollback() to be called.22 23This does not necessarily mean rollback() will succeed or not raise24an error, just that there is currently no state detected that indicates25rollback() would fail or emit warnings.26 27It also does not mean that there's a transaction in progress, as28it is usually safe to call rollback() even if no transaction is29present.30 31.. versionadded:: 1.4.2832 33r6r8s r�_rollback_can_be_called�,TransactionalContext._rollback_can_be_calledMs
��"�#�#r#c��[5err6r8s r�_get_subject�!TransactionalContext._get_subject^r;r#c��[5err6r8s r�commit�TransactionalContext.commitar;r#c��[5err6r8s r�rollback�TransactionalContext.rollbackdr;r#c��[5err6r8s r�close�TransactionalContext.closegr;r#c��URnU(a,UR5(d[R"S5egg)Nz�Can't operate on closed transaction inside context manager.  Please complete the context manager before emitting further commands.)r'r9r	�InvalidRequestError)�cls�subject�
trans_contexts   r�_trans_ctx_check�%TransactionalContext._trans_ctx_checkjsA���6�6�
�� �7�7�9�9��-�-�8���:�r#c�b�UR5nURnX lXlXlU$r)rCr'r2r3)rrQrRs   r�	__enter__�TransactionalContext.__enter__us4���#�#�%�� �6�6�
� -��%��)-�&��r#c��[USS5nUSL=(d URULnUcRUR5(a=UR5 U(dUceURUlS=Ul	UlgUR5(d&UR5(dUR5 O%UR
5(aUR5 U(dUceURUlS=Ul	Ulg! [R34"5 UR
5(aUR5 SSS5 GM!,(df   GN=f=f!U(dUceURUlS=Ul	Ulf=f!U(dUceURUlS=Ul	Ulf=f)Nr3)�getattrr'r9rFr35�safe_reraiser@rIr2r3r=rL)r�type_�value�	tracebackrQ�out_of_band_exits      r�__exit__�TransactionalContext.__exit__�s����$� 0�$�7��
�t�O�I�w�=�=�T�I�	��=�T�8�8�:�:�36
C����
�(�"�.�.�.�59�5J�5J�G�2�>B�B��#�d�&;�
C��2�2�4�4��6�6�8�8��37�38����3�3�5�5��
�
��'�"�.�.�.�59�5J�5J�G�2�>B�B��#�d�&;��+
(��&�&�(��3�3�5�5��
�
��)�(�(�(��(�"�.�.�.�59�5J�5J�G�2�>B�B��#�d�&;��(�"�.�.�.�59�5J�5J�G�2�>B�B��#�d�&;�sO�D	�=A F�	E%� &E�E%�E(�39E"	�E%�E(�"E%�%E(�(-F�-G)r2r3N)�return�bool)rar%)ra�None)rQr%rarc)rar
)r[rr\rr]rrarc)r)r*r+r,�__doc__�	__slots__r-r9r=r@rCrFrIrL�classmethodrSrVr_r.r(r#rr0r0;sW���F�I�+�+�$�$�$�"$�$�$�$�����40�&Cr#r0)r�strrazCallable[[_C], _C])�41__future__r�typingrrrr�r	r42�util._has_cyr�util.typingrr
�
TYPE_CHECKING�_py_utilrr�sqlalchemy.cyextension.utilrr"r%r0r(r#r�<module>rpsy��#�
�������*�"��	����B�D���
�T��"�c�'�*�+���&;�H�;�lC�lCr#
codekingpro/portable-devtools · Team Ai