
    g                        S SK Jr  S SKrS SKrS SKrS SKrS SKr\R                  S:  a  S SKJ	r	  OS SK
J	r	  \	" S5      r\R                  " S5      rSS jrSS jr " S	 S
\5      rSS jr    SS jrg)    )annotationsN)   
   )	ParamSpecPTc            
     P  ^#    [         R                  " S[        5        [        R                  " 5        IS h  vN mSU4S jjnU  H,  u  p#TR                  U[        R                  " U40 UD65        M.     S S S 5      IS h  vN   g  NO N! , IS h  vN  (       d  f       g = f7f)NzOrun_until_first_complete is deprecated and will be removed in a future version.c                d   >#    U " 5       I S h  vN   TR                   R                  5         g  N7fN)cancel_scopecancel)func
task_groups    N/home/matz/Project1/venv/lib/python3.13/site-packages/starlette/concurrency.pyrun%run_until_first_complete.<locals>.run   s&     &LL##**, s   0. 0)r   z%typing.Callable[[], typing.Coroutine]returnNone)warningswarnDeprecationWarninganyiocreate_task_group
start_soon	functoolspartial)argsr   r   kwargsr   s       @r   run_until_first_completer      sr     MMY
 &&((J	- !LD!!#y'8'8'H'HI ! )(((((sD   5B&BB&;B7B&B
B&
B&B#BB#B&c                   #    [         R                  " U /UQ70 UD6n [        R                  R	                  U 5      I S h  vN $  N7fr   )r   r   r   	to_threadrun_sync)r   r   r   s      r   run_in_threadpoolr#   #   s:     T3D3F3D))$////s   =AA Ac                      \ rS rSrSrg)_StopIteration(    N)__name__
__module____qualname____firstlineno____static_attributes__r'       r   r%   r%   (   s    r-   r%   c                B     [        U 5      $ ! [         a    [        ef = fr   )nextStopIterationr%   )iterators    r   _nextr2   ,   s&    H~ s   
 c                  #    [        U 5      n  [        R                  R                  [        U5      I S h  vN 7v   M2   N	! [
         a     g f = f7fr   )iterr   r!   r"   r2   r%   )r1   as_iterators     r   iterate_in_threadpoolr6   6   sK      x.K
	00DDD D 		s7   A'A AA AA 
AAAA)r   ztuple[typing.Callable, dict]r   r   )r   ztyping.Callable[P, T]r   zP.argsr   zP.kwargsr   r   )r1   ztyping.Iterator[T]r   r   )r1   ztyping.Iterable[T]r   ztyping.AsyncIterator[T])
__future__r   r   systypingr   anyio.to_threadr   version_infor   typing_extensionsr   TypeVarr   r   r#   	Exceptionr%   r2   r6   r'   r-   r   <module>r?      ss    "  
   w +cN
NN3J 0
	Y 	 r-   