
    _i)                       % 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   \(       aD  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-J.r.J/r/J0r0J1r1J2r2J3r3J4r4  SSK5J6r6  SSK7J8r8  SSK9J:r:  \" S5      r;\" S5      r<\\=\>SS4   r?S\@S'    " S S\S 9rAg)!    )annotationsN)ABCMetaabstractmethod)AsyncIterator	AwaitableCallableSequence)AbstractContextManager)PathLike)Signals)AddressFamily
SocketKindsocket)IOTYPE_CHECKINGAnyTypeVarUnionoverload)      )TypeVarTupleUnpack)r   
   )	TypeAlias)FileDescriptorLike   )CapacityLimiterEventLock	Semaphore)CancelScope)TaskInfo   )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\\          S8S j5       5       r\\S9S j5       5       r\\S:S j5       5       r\\S;S j5       5       r	\\S<S j5       5       r
\S<S j5       r\S<S j5       r\\S=S	 j5       5       r\\\R                  S
S.     S>S jj5       5       r\\S:S j5       5       r\\S?S j5       5       r\\S@S j5       5       r\\SAS j5       5       r\\SS
S.       SBS jj5       5       r\\SCS j5       5       r\\  SD         SES jj5       5       r\\S<S j5       5       r\\        SFS j5       5       r\\        SGS j5       5       r\\            SHS j5       5       r\\SIS j5       5       r\\ SJ       SKS jj5       5       r\\SLS j5       5       r\\SMS j5       5       r\\SMS j5       5       r \\          SNS j5       5       r!\\"      SOS  j5       5       r#\\"      SPS! j5       5       r#\\      SQS" j5       5       r#\\S#S#S#S#S$.             SRS% jj5       5       r$\\ SS     STS& jj5       5       r%\\SUS' j5       5       r&\\SUS( j5       5       r'\\SUS) j5       5       r(\\SMS* j5       5       r)\\SVS+ j5       5       r*\\SWS, j5       5       r+\\SXS- j5       5       r,\\SYS. j5       5       r-\\SZS/ j5       5       r.\\    S[S0 j5       5       r/\\S\S1 j5       5       r0\\    S]S2 j5       5       r1\\S^S3 j5       5       r2\\S_S4 j5       5       r3\\S<S5 j5       5       r4\\S`S6 j5       5       r5S7r6g)aAsyncBackend7   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        P/var/www/html/land-ocr/venv/lib/python3.13/site-packages/anyio/abc/_eventloop.pyrunAsyncBackend.run8           c                    g)z
Return an object that allows other threads to run code inside the event loop.

:return: a token object, specific to the event loop running in the current
    thread
Nr7   r8   s    r=   current_tokenAsyncBackend.current_tokenN   r@   rA   c                    g)zb
Return the current value of the event loop's internal clock.

:return: the clock value (seconds)
Nr7   rC   s    r=   current_timeAsyncBackend.current_timeX   r@   rA   c                    g)zFReturn the exception class that is raised in a task if it's cancelled.Nr7   rC   s    r=   cancelled_exception_class&AsyncBackend.cancelled_exception_classa   r@   rA   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`.
Nr7   rC   s    r=   
checkpointAsyncBackend.checkpointf           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infrM   rC   s    r=   checkpoint_if_cancelled$AsyncBackend.checkpoint_if_cancelledp   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sleeprC   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
Nr7   )r8   delays     r=   rZ   AsyncBackend.sleep   rO   rP   F)deadlinerX   c                   g Nr7   )r8   r`   rX   s      r=   rY    AsyncBackend.create_cancel_scope       
 	rA   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
Nr7   rC   s    r=   rR   'AsyncBackend.current_effective_deadline   r@   rA   c                    g rb   r7   rC   s    r=   create_task_groupAsyncBackend.create_task_group        	rA   c                    g rb   r7   rC   s    r=   create_eventAsyncBackend.create_event   rj   rA   c                   g rb   r7   )r8   fast_acquires     r=   create_lockAsyncBackend.create_lock   rj   rA   N)	max_valuero   c                   g rb   r7   )r8   initial_valuerr   ro   s       r=   create_semaphoreAsyncBackend.create_semaphore   s     	rA   c                    g rb   r7   )r8   total_tokenss     r=   create_capacity_limiter$AsyncBackend.create_capacity_limiter   rj   rA   c                   #    g 7frb   r7   )r8   r9   r:   abandon_on_cancellimiters        r=   run_sync_in_worker_thread&AsyncBackend.run_sync_in_worker_thread   
      	rP   c                    g rb   r7   rC   s    r=   check_cancelledAsyncBackend.check_cancelled   rj   rA   c                    g rb   r7   r8   r9   r:   tokens       r=   run_async_from_thread"AsyncBackend.run_async_from_thread        	rA   c                    g rb   r7   r   s       r=   run_sync_from_thread!AsyncBackend.run_sync_from_thread   r   rA   c                  #    g 7frb   r7   )r8   commandstdinstdoutstderrr;   s         r=   open_processAsyncBackend.open_process   s
      	rP   c                    g rb   r7   )r8   workerss     r=   #setup_process_pool_exit_at_shutdown0AsyncBackend.setup_process_pool_exit_at_shutdown   rj   rA   c                   #    g 7frb   r7   )r8   hostportlocal_addresss       r=   connect_tcpAsyncBackend.connect_tcp   
     
 	rP   c                   #    g 7frb   r7   )r8   paths     r=   connect_unixAsyncBackend.connect_unix  
      	rP   c                    g rb   r7   r8   socks     r=   create_tcp_listener AsyncBackend.create_tcp_listener  rj   rA   c                    g rb   r7   r   s     r=   create_unix_listener!AsyncBackend.create_unix_listener  rj   rA   c                   #    g 7frb   r7   )r8   familyr   remote_address
reuse_ports        r=   create_udp_socketAsyncBackend.create_udp_socket  r   rP   c                   #    g 7frb   r7   r8   
raw_socketremote_paths      r=   create_unix_datagram_socket(AsyncBackend.create_unix_datagram_socket  s
      !rP   c                   #    g 7frb   r7   r   s      r=   r   r   "  s
      '*rP   c                   #    g 7frb   r7   r   s      r=   r   r   (  r   rP   r   )r   typeprotoflagsc                  #    g 7frb   r7   )r8   r   r   r   r   r   r   s          r=   getaddrinfoAsyncBackend.getaddrinfo/  s
     ( 	rP   c                   #    g 7frb   r7   )r8   sockaddrr   s      r=   getnameinfoAsyncBackend.getnameinfoE  r   rP   c                   #    g 7frb   r7   r8   objs     r=   wait_readableAsyncBackend.wait_readableL  r   rP   c                   #    g 7frb   r7   r   s     r=   wait_writableAsyncBackend.wait_writableQ  r   rP   c                    g rb   r7   r   s     r=   notify_closingAsyncBackend.notify_closingV  rj   rA   c                   #    g 7frb   r7   r   s     r=   wrap_listener_socket!AsyncBackend.wrap_listener_socket[  r   rP   c                   #    g 7frb   r7   r   s     r=   wrap_stream_socketAsyncBackend.wrap_stream_socket`  r   rP   c                   #    g 7frb   r7   r   s     r=   wrap_unix_stream_socket$AsyncBackend.wrap_unix_stream_sockete  r   rP   c                   #    g 7frb   r7   r   s     r=   wrap_udp_socketAsyncBackend.wrap_udp_socketj  r   rP   c                   #    g 7frb   r7   r   s     r=   wrap_connected_udp_socket&AsyncBackend.wrap_connected_udp_socketo  r   rP   c                   #    g 7frb   r7   r   s     r=   wrap_unix_datagram_socket&AsyncBackend.wrap_unix_datagram_sockett  r   rP   c                   #    g 7frb   r7   r   s     r=   #wrap_connected_unix_datagram_socket0AsyncBackend.wrap_connected_unix_datagram_sockety  r   rP   c                    g rb   r7   rC   s    r=   current_default_thread_limiter+AsyncBackend.current_default_thread_limiter  rj   rA   c                    g rb   r7   )r8   signalss     r=   open_signal_receiver!AsyncBackend.open_signal_receiver  rd   rA   c                    g rb   r7   rC   s    r=   get_current_taskAsyncBackend.get_current_task  rj   rA   c                    g rb   r7   rC   s    r=   get_running_tasksAsyncBackend.get_running_tasks  rj   rA   c                   #    g 7frb   r7   rC   s    r=   wait_all_tasks_blocked#AsyncBackend.wait_all_tasks_blocked  r   rP   c                    g rb   r7   )r8   r<   s     r=   create_test_runnerAsyncBackend.create_test_runner  rj   rA   r7   )
r9   1Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]]r:   tuple[Unpack[PosArgsT]]r;   dict[str, Any]r<   r   returnr0   )r   object)r   float)r   ztype[BaseException])r   None)r^   r   r   r   )r`   r   rX   boolr   r"   )r   r.   )r   r   )ro   r   r   r    )rt   intrr   z
int | Nonero   r   r   r!   )rx   r   r   r   )FN)
r9   &Callable[[Unpack[PosArgsT]], T_Retval]r:   r   r|   r   r}   zCapacityLimiter | Noner   r0   )r9   r   r:   r   r   r   r   r0   )r9   r   r:   r   r   r   r   r0   )r   z)StrOrBytesPath | Sequence[StrOrBytesPath]r   int | IO[Any] | Noner   r  r   r  r;   r   r   r-   )r   zset[Process]r   r   rb   )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   r   r   r   )r   r   r   r)   )r   r   r   r,   )r   r   r   r*   )r   r   r   r%   )r   r   r   r+   )r   r   r   r&   )r   r   )r   r   r   z.AbstractContextManager[AsyncIterator[Signals]])r   r#   )r   zSequence[TaskInfo])r<   r   r   r/   )7__name__
__module____qualname____firstlineno__classmethodr   r>   rD   rG   rJ   rM   rU   r[   rZ   rS   rT   rY   rR   rh   rl   rp   ru   ry   r~   r   r   r   r   r   r   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__r7   rA   r=   r4   r4   7   s{   ? & 	
   
  (       U  U    	# 	# 	 	    "&((548	  
 
  
          
 !%" 	
  
      
 #(*.4 &  	
 ( 
      ? & 	
 
   4 & 	
 
   	:	 $		
 %	 %	 	 
	  	    JN!2G	  
           - .	
  
(   !!.2!	!  ! **.9*	$*  * .@	9  
  '(!"  
 $   
  ( 45%.1	  
                            	$  
    	7  
            rA   r4   )	metaclass)B
__future__r   rS   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#   _socketsr%   r&   r'   r(   r)   r*   r+   r,   _subprocessesr-   _tasksr.   _testingr/   r0   r1   r  bytesr2   __annotations__r4   r7   rA   r=   <module>r      s    "  
 ' H H -   4 4  w++6w +,PP*)	 	 	 '!$:
#!#uo?P"PQ	 QgW grA   