Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2��j}��r�SSKJr SSKJr SSKrSSKJr SSKJr Sr	\"5r3S	rS4rSr
SrS
rSrg)�)�annotations)�wrapsN�)�config�)�5_AsyncUtilTc�,�[R5 g)zcalled when the test finishesN)�_async_util�close���`D:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/testing/asyncio.py�	_shutdownr#s�����r
c�6�[R"U/UQ70UD6$�N)r6�run��fn�args�kwargss   r�_run_coroutine_functionr(s���?�?�2�/��/��/�/r
c�\�[(dU"U0UD6$[R"U/UQ70UD6$)z�Run a function in an asyncio loop unconditionally.7 8This function is used for provisioning features like9testing a database connection for server info.10 11Note that for blocking IO database drivers, this means they block the12event loop.13 14)�ENABLE_ASYNCIOr15�run_in_greenletrs   r�
_assume_asyncr,s4���>��4�"�6�"�"��&�&�r�;�D�;�F�;�;r
c��[(dU"U0UD6$[R(a[R"U/UQ70UD6$U"U0UD6$)a�Run a function in an asyncio loop if any current drivers might need it.16 17This function is used for provisioning features that take18place outside of a specific database driver being selected, so if the19current driver that happens to be used for the provisioning operation20is an async driver, it will run in asyncio and not fail.21 22Note that for blocking IO database drivers, this means they block the23event loop.24 25)rr�	any_asyncr26rrs   r�_maybe_async_provisioningr=sM���>��4�"�6�"�"�
����*�*�2�?��?��?�?��4�"�6�"�"r
c��[(dU"U0UD6$[RRnU(a[R27"U/UQ70UD6$U"U0UD6$)z�Run a function in an asyncio loop if the current selected driver is28async.29 30This function is used for test setup/teardown and tests themselves31where the current DB driver is known.32 33 34)rr�_current�is_asyncr35r)rrrr!s    r�_maybe_asyncr"RsV���>��4�"�6�"�"����'�'�H���*�*�2�?��?��?�?��4�"�6�"�"r
c�^^^�[R"T5(a([5mU4Sjm[T5UUU4Sj5nU$[T5U4Sj5nU$)z�Apply the _maybe_async function to an existing function and return36as a wrapped callable, supporting generator functions as well.37 38This is currently used for pytest fixtures that support generator use.39 40c�@>�[U5$![a Ts$f=fr)�next�
StopIteration)�gen�_stops �r�	call_next�'_maybe_async_wrapper.<locals>.call_nextqs&���
��C�y� �� �
���
�s�41��c?�N># �T"U0UD6n[TU5nUTLagUv� M7fr�r")rrr'�valuer(r)rs    ���r�wrap_fixture�*_maybe_async_wrapper.<locals>.wrap_fixturexs8�����d�%�f�%�C��$�Y��4���E�>����	�s�"%c�">�[T/UQ70UD6$rr,)rrrs  �rr.r/�s�����4�T�4�V�4�4r
)�inspect�isgeneratorfunction�objectr)rr.r(r)s` @@r�_maybe_async_wrapperr4fsb����"�"�2�&�&����	�42�r��	�43�	���	44�r��	5�45�	5��r
)�46__future__r�	functoolsrr1�r�util.concurrencyrrr47rrrrr"r4rr
r�<module>r9sB��*#����)����l���480�<�"#�*#�(!r
codekingpro/portable-devtools · Team Ai