Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2�j&��n�%SSKJr SrSSKrSSKJr SSKJr SSKJ	r	J3r4JrJrJ
r
Jr SSKJr SS	KJr SS5KJr \"S5r\"S5rSS
jrSSjrSSjr\
\"SSS9"SS555rSSjr\"5rS\S'"SS\R<5r"SS\6\5r "SS\7\5r!g) �)�annotations)�EventLoopToken�RunvarToken�RunVar�8checkpoint�checkpoint_if_cancelled�cancel_shielded_checkpoint�
current_tokenN)�	dataclass)�
TracebackType)�Any�Generic�Literal�TypeVar�final�overload)�WeakKeyDictionary�)�get_async_backend)�AsyncBackend�T�Dc��P# �[5R5IShv�N gN7f)z�9Check for cancellation and allow the scheduler to switch to another task.10 11Equivalent to (but more efficient than)::12 13    await checkpoint_if_cancelled()14    await cancel_shielded_checkpoint()15 16.. versionadded:: 3.017 18N)rr���TD:\code\apps\devtools\python\user_packages\Python313\site-packages\anyio/lowlevel.pyrrs����19�20(�21(�22*�*�*���&�$�&c��P# �[5R5IShv�N gN7f)z�23Enter a checkpoint if the enclosing cancel scope has been cancelled.24 25This does not allow the scheduler to switch to a different task.26 27.. versionadded:: 3.028 29N)rrrrrrr)s����30�315�325�337�7�7�rc��P# �[5R5IShv�N gN7f)z�34Allow the scheduler to switch to another task but without checking for cancellation.35 36Equivalent to (but potentially more efficient than)::37 38    with CancelScope(shield=True):39        await checkpoint()40 41.. versionadded:: 3.042 43N)rr	rrrr	r	5s����44�458�468�47:�:�:�rTF)�frozen�reprc�.�\rSrSr%SrS\S'S\S'Srg)	r�DzU48An opaque object that holds a reference to an event loop.49 50.. versionadded:: 4.11.051ztype[AsyncBackend]�
backend_class�object�native_tokenrN)�__name__�52__module__�__qualname__�__firstlineno__�__doc__�__annotations__�__static_attributes__rrrrrDs���&�%��rrc�L�[5nUR5n[X5$)z�53Return a token object that can be used to call code in the current event loop from54another thread.55 56:raises NoEventLoopError: if no supported asynchronous event loop is running in the57    current thread58 59.. versionadded:: 4.11.060 61)rr62r)r$�	raw_tokens  rr63r64Qs%��&�'�M��+�+�-�I��-�3�3rz1WeakKeyDictionary[object, dict[RunVar[Any], Any]]�	_run_varsc�6�\rSrSr\R65"5rSrg)�_NoValueSet�drN)r'r(r)r*�enum�auto�NO_VALUE_SETr-rrrr2r2ds
���9�9�;�Lrr2c�F�\rSrSrSrSSjrS	SjrS66SjrSrg)r�h��_var�_value�	_redeemedc�*�XlX lSUlg)NFr9)�self�var�values   r�__init__�RunvarToken.__init__ks���	�=B����rc��U$�Nr�r>s r�	__enter__�RunvarToken.__enter__ps���rc�:�URRU5 grD)r:�reset)r>�exc_type�exc_val�exc_tbs    r�__exit__�RunvarToken.__exit__ss��	
�	�	����r)r<r;r:N)r?z	RunVar[T]r@�%T | Literal[_NoValueSet.NO_VALUE_SET])�return�RunvarToken[T])rJztype[BaseException] | NonerKzBaseException | NonerLzTracebackType | NonerP�None)	r'r(r)r*�	__slots__rArFrMr-rrrrrhs<��-�I��67��,��&��%�	�6869�rrc���\rSrSr%SrSr\RrS\S'\4SSjjr	\70SSj5r\SSj5r
\SS	j5r
\4SS71jjr
SSjrSSjrSS
jrSrg)r�|z�72Like a :class:`~contextvars.ContextVar`, except scoped to the running event loop.73 74Can be used as a context manager, Just like :class:`~contextvars.ContextVar`, that75will reset the variable to its previous value when the context block is exited.76��_name�_defaultz!Literal[_NoValueSet.NO_VALUE_SET]r6c��XlX lgrDrV)r>�name�defaults   rrA�RunVar.__init__�s���77��
rc�x�[5Rn[U$![a 0=n[U'Us$f=frD)r78r&r0�KeyError)r>r&�run_varss   r�
_current_vars�RunVar._current_vars�sB��$��3�3��	��\�*�*���	�13�3�H�y��.��O�	�s��9�9c��grDr�r>r[s  r�get�79RunVar.get�s��(+rc��grDrrEs rrdre�s��rc���URU$![aE U[RLaUs$UR[RLaURs$Of=f[SURS35e)NzRun variable "z!" has no value and no default set)r`r^rr6rX�LookupErrorrWrcs  rrdre�s{��	%��%�%�d�+�+���	%��f�1�1�1������f�&9�&9�9��}�}�$�:�	%����T�Z�Z�L�(I�J�80�	81s��A �)A �A c�x�URn[XRU[R55nXU'U$rD)r`rrdrr6)r>r@�current_vars�tokens    r�set�82RunVar.set�s7���)�)���D�"2�"2�4��9L�9L�"M�N��"�T���rc�(�URULa[S5eUR(a[S5eUR[R83LaURU	OURURU'SUlg![a Nf=f)Nz)This token does not belong to this RunVarz This token has already been usedT)r:�84ValueErrorr<r;r2r6r`r^)r>rks  rrI�RunVar.reset�s����:�:�T�!��H�I�I��?�?��?�@�@��<�<�;�3�3�3�
��&�&�t�,�(-�|�|�D���t�$������
��
�s�
B�85B�Bc�$�SUR<S3$)Nz
<RunVar name=�>)rWrEs r�__repr__�RunVar.__repr__�s���t�z�z�n�A�.�.r)rXrWN)rZ�strr[rO)rPzdict[RunVar[T], T])r[rrP�T | D)rPr)r[z%D | Literal[_NoValueSet.NO_VALUE_SET]rPrv)r@rrPrQ)rkrQrPrR)rPru)r'r(r)r*r+rSr2r6r,rA�propertyr`rrdrlrIrsr-rrrrr|s����$�I�6A�6N�6N�L�3�N�KW� �� �"G� ������+��+�
����@L�
86�<�
87�	�
88���"/rr)rPrR)rPr)"�89__future__r�__all__r4�dataclassesr�typesr�typingr
rrrrr�weakrefr�_core._eventloopr�abcrrrrrr	rr90r0r,�Enumr2rrrrr�<module>r�s���"����!��B�B�%�/���C�L���C�L��+�	8�;��91�$�U�#���$���
4� @Q�?R�	�<�R��$�)�)���'�!�*��(H/�W�Q�Z�H/r