
    h%                       % S SK Jr  S SKrS SKrS SKJrJr  S SKJrJ	r	J
r
Jr  S SKJr  S SKJr  S SKJr  S SKJrJrJr  S S	KJrJrJrJrJrJr  \R8                  S
:  a	  S SKJrJr  OS SKJrJr  \R8                  S:  a  S SKJ r   OS SKJ r   \(       aJ  S SK!J"r"  SSK#J$r$J%r%J&r&J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6  SSK7J8r8  SSK9J:r:  SSK;J<r<  \" S5      r=\" S5      r>\\?\@SS4   rAS\BS'    " S S \S!9rCg)"    )annotationsN)ABCMetaabstractmethod)AsyncIterator	AwaitableCallableSequence)AbstractContextManager)PathLike)Signals)AddressFamily
SocketKindsocket)IOTYPE_CHECKINGAnyTypeVarUnionoverload)      )TypeVarTupleUnpack)r   
   )	TypeAlias)	HasFileno   )CapacityLimiterEventLock	Semaphore)CancelScope)TaskInfo)BlockingPortal   )ConnectedUDPSocketConnectedUNIXDatagramSocketIPSockAddrTypeSocketListenerSocketStream	UDPSocketUNIXDatagramSocketUNIXSocketStream)Process)	TaskGroup)
TestRunnerT_RetvalPosArgsTzPathLike[str]zPathLike[bytes]r   StrOrBytesPathc                     \ rS rSr\\          S1S j5       5       r\\S2S j5       5       r\\S3S j5       5       r\\S4S j5       5       r	\\S5S j5       5       r
\S5S j5       r\S5S j5       r\\S6S	 j5       5       r\\\R                  S
S.     S7S jj5       5       r\\S3S j5       5       r\\S8S j5       5       r\\S9S j5       5       r\\S:S j5       5       r\\SS
S.       S;S jj5       5       r\\S<S j5       5       r\\  S=         S>S jj5       5       r\\S5S j5       5       r\\        S?S j5       5       r\\        S@S j5       5       r\\SAS j5       5       r\\            SBS j5       5       r\\SCS j5       5       r\\ SD       SES jj5       5       r\\SFS j5       5       r\\SGS j5       5       r \\SGS j5       5       r!\\          SHS  j5       5       r"\\#      SIS! j5       5       r$\\#      SJS" j5       5       r$\\      SKS# j5       5       r$\\S$S$S$S$S%.             SLS& jj5       5       r%\\ SM     SNS' jj5       5       r&\\SOS( j5       5       r'\\SOS) j5       5       r(\\SPS* j5       5       r)\\    SQS+ j5       5       r*\\SRS, j5       5       r+\\SSS- j5       5       r,\\S5S. j5       5       r-\\STS/ j5       5       r.S0r/g)UAsyncBackend8   c                    g)a  
Run the given coroutine function in an asynchronous event loop.

The current thread must not be already running an event loop.

:param func: a coroutine function
:param args: positional arguments to ``func``
:param kwargs: positional arguments to ``func``
:param options: keyword arguments to call the backend ``run()`` implementation
    with
:return: the return value of the coroutine function
N )clsfuncargskwargsoptionss        F/var/www/html/env/lib/python3.13/site-packages/anyio/abc/_eventloop.pyrunAsyncBackend.run9           c                    g)z

:return:
Nr8   r9   s    r>   current_tokenAsyncBackend.current_tokenO   rA   rB   c                    g)zb
Return the current value of the event loop's internal clock.

:return: the clock value (seconds)
Nr8   rD   s    r>   current_timeAsyncBackend.current_timeW   rA   rB   c                    g)zFReturn the exception class that is raised in a task if it's cancelled.Nr8   rD   s    r>   cancelled_exception_class&AsyncBackend.cancelled_exception_class`   rA   rB   c                   #    g7f)z
Check if the task has been cancelled, and allow rescheduling of other tasks.

This is effectively the same as running :meth:`checkpoint_if_cancelled` and then
:meth:`cancel_shielded_checkpoint`.
Nr8   rD   s    r>   
checkpointAsyncBackend.checkpointe           c                   #    U R                  5       [        R                  * :X  a  U R                  5       I Sh  vN   gg N7f)z
Check if the current task group has been cancelled.

This will check if the task has been cancelled, but will not allow other tasks
to be scheduled if not.

N)current_effective_deadlinemathinfrN   rD   s    r>   checkpoint_if_cancelled$AsyncBackend.checkpoint_if_cancelledo   s6      ))+y8..""" 9"s   7AA Ac                   #    U R                  SS9   U R                  S5      I Sh  vN   SSS5        g N! , (       d  f       g= f7f)z
Allow the rescheduling of other tasks.

This will give other tasks the opportunity to run, but without checking if the
current task group has been cancelled, unlike with :meth:`checkpoint`.

T)shieldr   N)create_cancel_scopesleeprD   s    r>   cancel_shielded_checkpoint'AsyncBackend.cancel_shielded_checkpoint{   s<      $$D$1))A, 21 21s%   A757	A7
AAc                   #    g7f)z\
Pause the current task for the specified duration.

:param delay: the duration, in seconds
Nr8   )r9   delays     r>   r[   AsyncBackend.sleep   rP   rQ   F)deadlinerY   c                   g Nr8   )r9   ra   rY   s      r>   rZ    AsyncBackend.create_cancel_scope       
 	rB   c                    g)a  
Return the nearest deadline among all the cancel scopes effective for the
current task.

:return:
    - a clock value from the event loop's internal clock
    - ``inf`` if there is no deadline in effect
    - ``-inf`` if the current scope has been cancelled
:rtype: float
Nr8   rD   s    r>   rS   'AsyncBackend.current_effective_deadline   rA   rB   c                    g rc   r8   rD   s    r>   create_task_groupAsyncBackend.create_task_group        	rB   c                    g rc   r8   rD   s    r>   create_eventAsyncBackend.create_event   rk   rB   c                   g rc   r8   )r9   fast_acquires     r>   create_lockAsyncBackend.create_lock   rk   rB   N)	max_valuerp   c                   g rc   r8   )r9   initial_valuers   rp   s       r>   create_semaphoreAsyncBackend.create_semaphore   s     	rB   c                    g rc   r8   )r9   total_tokenss     r>   create_capacity_limiter$AsyncBackend.create_capacity_limiter   rk   rB   c                   #    g 7frc   r8   )r9   r:   r;   abandon_on_cancellimiters        r>   run_sync_in_worker_thread&AsyncBackend.run_sync_in_worker_thread   
      	rQ   c                    g rc   r8   rD   s    r>   check_cancelledAsyncBackend.check_cancelled   rk   rB   c                    g rc   r8   r9   r:   r;   tokens       r>   run_async_from_thread"AsyncBackend.run_async_from_thread        	rB   c                    g rc   r8   r   s       r>   run_sync_from_thread!AsyncBackend.run_sync_from_thread   r   rB   c                    g rc   r8   rD   s    r>   create_blocking_portal#AsyncBackend.create_blocking_portal   rk   rB   c                  #    g 7frc   r8   )r9   commandstdinstdoutstderrr<   s         r>   open_processAsyncBackend.open_process   s
      	rQ   c                    g rc   r8   )r9   workerss     r>   #setup_process_pool_exit_at_shutdown0AsyncBackend.setup_process_pool_exit_at_shutdown   rk   rB   c                   #    g 7frc   r8   )r9   hostportlocal_addresss       r>   connect_tcpAsyncBackend.connect_tcp   
     
 	rQ   c                   #    g 7frc   r8   )r9   paths     r>   connect_unixAsyncBackend.connect_unix  
      	rQ   c                    g rc   r8   r9   socks     r>   create_tcp_listener AsyncBackend.create_tcp_listener  rk   rB   c                    g rc   r8   r   s     r>   create_unix_listener!AsyncBackend.create_unix_listener  rk   rB   c                   #    g 7frc   r8   )r9   familyr   remote_address
reuse_ports        r>   create_udp_socketAsyncBackend.create_udp_socket  r   rQ   c                   #    g 7frc   r8   r9   
raw_socketremote_paths      r>   create_unix_datagram_socket(AsyncBackend.create_unix_datagram_socket   s
      !rQ   c                   #    g 7frc   r8   r   s      r>   r   r   &  s
      '*rQ   c                   #    g 7frc   r8   r   s      r>   r   r   ,  r   rQ   r   )r   typeprotoflagsc                  #    g 7frc   r8   )r9   r   r   r   r   r   r   s          r>   getaddrinfoAsyncBackend.getaddrinfo3  s
     ( 	rQ   c                   #    g 7frc   r8   )r9   sockaddrr   s      r>   getnameinfoAsyncBackend.getnameinfoI  r   rQ   c                   #    g 7frc   r8   r9   objs     r>   wait_readableAsyncBackend.wait_readableP  r   rQ   c                   #    g 7frc   r8   r   s     r>   wait_writableAsyncBackend.wait_writableU  r   rQ   c                    g rc   r8   rD   s    r>   current_default_thread_limiter+AsyncBackend.current_default_thread_limiterZ  rk   rB   c                    g rc   r8   )r9   signalss     r>   open_signal_receiver!AsyncBackend.open_signal_receiver_  re   rB   c                    g rc   r8   rD   s    r>   get_current_taskAsyncBackend.get_current_taskf  rk   rB   c                    g rc   r8   rD   s    r>   get_running_tasksAsyncBackend.get_running_tasksk  rk   rB   c                   #    g 7frc   r8   rD   s    r>   wait_all_tasks_blocked#AsyncBackend.wait_all_tasks_blockedp  r   rQ   c                    g rc   r8   )r9   r=   s     r>   create_test_runnerAsyncBackend.create_test_runneru  rk   rB   r8   )
r:   1Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]]r;   tuple[Unpack[PosArgsT]]r<   dict[str, Any]r=   r   returnr1   )r   object)r   float)r   ztype[BaseException])r   None)r_   r   r   r   )ra   r   rY   boolr   r"   )r   r/   )r   r   )rp   r   r   r    )ru   intrs   z
int | Nonerp   r   r   r!   )ry   r   r   r   )FN)
r:   &Callable[[Unpack[PosArgsT]], T_Retval]r;   r   r}   r   r~   zCapacityLimiter | Noner   r1   )r:   r   r;   r   r   r   r   r1   )r:   r   r;   r   r   r   r   r1   )r   r$   )r   z)StrOrBytesPath | Sequence[StrOrBytesPath]r   int | IO[Any] | Noner   r   r   r   r<   r   r   r.   )r   zset[Process]r   r   rc   )r   strr   r   r   IPSockAddrType | Noner   r*   )r   str | bytesr   r-   )r   r   r   r)   )
r   r   r   r   r   r   r   r   r   zUDPSocket | ConnectedUDPSocket)r   r   r   r   r   r,   )r   r   r   r   r   r'   )r   r   r   zstr | bytes | Noner   z0UNIXDatagramSocket | ConnectedUNIXDatagramSocket)r   zbytes | str | Noner   zstr | int | Noner   zint | AddressFamilyr   zint | SocketKindr   r   r   r   r   zuSequence[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]])r   )r   r(   r   r   r   ztuple[str, str])r   zHasFileno | intr   r   )r   r   )r   r   r   z.AbstractContextManager[AsyncIterator[Signals]])r   r#   )r   zSequence[TaskInfo])r=   r   r   r0   )0__name__
__module____qualname____firstlineno__classmethodr   r?   rE   rH   rK   rN   rV   r\   r[   rT   rU   rZ   rS   ri   rm   rq   rv   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r8   rB   r>   r5   r5   8   s   ? & 	
   
  (       U  U    	# 	# 	 	    "&((548	  
 
  
          
 !%" 	
  
      
 #(*.4 &  	
 ( 
      ? & 	
 
   4 & 	
 
      	:	 $		
 %	 %	 	 
	  	    JN!2G	  
           - .	
  
(   !!.2!	!  ! **.9*	$*  * .@	9  
  '(!"  
 $   
  ( 45%.1	  
          	7  
            rB   r5   )	metaclass)D
__future__r   rT   sysabcr   r   collections.abcr   r   r   r	   
contextlibr
   osr   signalr   r   r   r   typingr   r   r   r   r   r   version_infor   r   typing_extensionsr   	_typeshedr   _core._synchronizationr   r   r    r!   _core._tasksr"   _core._testingr#   from_threadr$   _socketsr&   r'   r(   r)   r*   r+   r,   r-   _subprocessesr.   _tasksr/   _testingr0   r1   r2   r   bytesr3   __annotations__r5   r8   rB   r>   <module>r     s    "  
 ' H H -   4 4  w++6w +#PP*),	 	 	 '!$:
#!#uo?P"PQ	 Q@W @rB   