
    vKg                       S SK Jr  S SKrS SKrS SKJr  S SKJrJr  S SK	r	\(       a  S SK
Jr  SS.SS jjrSS.     SS	 jjrSS
 jrSS jrSS jr " S S\5      r\SS.     SS jj5       r\SS.     SS jj5       rS\R*                  ;   aG  S SKr\\4 H:  r\R0                  R3                  \5      R5                  \	R6                  S9\l        M<     gg)    )annotationsN)contextmanager)TYPE_CHECKINGNoReturn)	GeneratorFshieldc               *    [         R                  " XS9$ )a  Use as a context manager to create a cancel scope with the given
absolute deadline.

Args:
  deadline (float): The deadline.
  shield (bool): Initial value for the `~trio.CancelScope.shield` attribute
      of the newly created cancel scope.

Raises:
  ValueError: if deadline is NaN.

deadliner	   )trioCancelScoper   s     N/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/trio/_timeouts.py
move_on_atr      s     X==    c                   U S:  a  [        S5      e[        R                  " U 5      (       a  [        S5      e[        R                  " UU S9$ )ax  Use as a context manager to create a cancel scope whose deadline is
set to now + *seconds*.

The deadline of the cancel scope is calculated upon entering.

Args:
  seconds (float): The timeout.
  shield (bool): Initial value for the `~trio.CancelScope.shield` attribute
      of the newly created cancel scope.

Raises:
  ValueError: if ``seconds`` is less than zero or NaN.

r   `seconds` must be non-negativez`seconds` must not be NaN)r	   relative_deadline)
ValueErrormathisnanr   r   )secondsr	   s     r   move_on_afterr      sK    ( {9::zz'455! r   c                 t   #    [         R                  R                  S 5      I Sh  vN   [        S5      e N7f)zuPause execution of the current task forever (or until cancelled).

Equivalent to calling ``await sleep(math.inf)``.

c                J    [         R                  R                  R                  $ )N)r   lowlevelAbort	SUCCEEDED)_s    r   <lambda>sleep_forever.<locals>.<lambda>C   s    8K8K8U8Ur   Nz#Should never have been rescheduled!)r   r   wait_task_rescheduledRuntimeError r   r   sleep_foreverr%   =   s2      --
-
-.U
VVV
<
== Ws   $868c                ~   #    [        U 5         [        5       I Sh  vN   SSS5        g N! , (       d  f       g= f7f)a  Pause execution of the current task until the given time.

The difference between :func:`sleep` and :func:`sleep_until` is that the
former takes a relative time and the latter takes an absolute time
according to Trio's internal clock (as returned by :func:`current_time`).

Args:
    deadline (float): The time at which we should wake up again. May be in
        the past, in which case this function executes a checkpoint but
        does not block.

Raises:
  ValueError: if deadline is NaN.

N)r   r%   )r   s    r   sleep_untilr'   G   s-       
H	o 
	 
	s    =,*,	=,
:=c                   #    U S:  a  [        S5      eU S:X  a'  [        R                  R                  5       I Sh  vN   g[	        [        R
                  " 5       U -   5      I Sh  vN   g N/ N7f)a  Pause execution of the current task for the given number of seconds.

Args:
    seconds (float): The number of seconds to sleep. May be zero to
        insert a checkpoint without actually blocking.

Raises:
    ValueError: if *seconds* is negative or NaN.

r   r   N)r   r   r   
checkpointr'   current_time)r   s    r   sleepr+   [   s[      {9::!|mm&&((($++-7888 	)8s!   9A/A+)A/%A-&A/-A/c                      \ rS rSrSrSrg)TooSlowErrorn   zJRaised by :func:`fail_after` and :func:`fail_at` if the timeout
expires.

r$   N)__name__
__module____qualname____firstlineno____doc____static_attributes__r$   r   r   r-   r-   n   s    r   r-   c             #     #    [        XS9 nUv   SSS5        WR                  (       a  [        eg! , (       d  f       N&= f7f)aD  Creates a cancel scope with the given deadline, and raises an error if it
is actually cancelled.

This function and :func:`move_on_at` are similar in that both create a
cancel scope with a given absolute deadline, and if the deadline expires
then both will cause :exc:`Cancelled` to be raised within the scope. The
difference is that when the :exc:`Cancelled` exception reaches
:func:`move_on_at`, it's caught and discarded. When it reaches
:func:`fail_at`, then it's caught and :exc:`TooSlowError` is raised in its
place.

Args:
  deadline (float): The deadline.
  shield (bool): Initial value for the `~trio.CancelScope.shield` attribute
      of the newly created cancel scope.

Raises:
  TooSlowError: if a :exc:`Cancelled` exception is raised in this scope
    and caught by the context manager.
  ValueError: if deadline is NaN.

r   N)r   cancelled_caughtr-   )r   r	   scopes      r   fail_atr8   u   s7     8 
H	, 
-  
-	,   
A1 A
?Ac             #     #    [        XS9 nUv   SSS5        WR                  (       a  [        eg! , (       d  f       N&= f7f)a  Creates a cancel scope with the given timeout, and raises an error if
it is actually cancelled.

This function and :func:`move_on_after` are similar in that both create a
cancel scope with a given timeout, and if the timeout expires then both
will cause :exc:`Cancelled` to be raised within the scope. The difference
is that when the :exc:`Cancelled` exception reaches :func:`move_on_after`,
it's caught and discarded. When it reaches :func:`fail_after`, then it's
caught and :exc:`TooSlowError` is raised in its place.

The deadline of the cancel scope is calculated upon entering.

Args:
  seconds (float): The timeout.
  shield (bool): Initial value for the `~trio.CancelScope.shield` attribute
      of the newly created cancel scope.

Raises:
  TooSlowError: if a :exc:`Cancelled` exception is raised in this scope
    and caught by the context manager.
  ValueError: if *seconds* is less than zero or NaN.

r   N)r   r6   r-   )r   r	   r7   s      r   
fail_afterr;      s7     : 
w	.% 
/  
/	.r9   sphinx)return_annotation)r   floatr	   boolreturntrio.CancelScope)r   r>   r	   r?   r@   rA   )r@   r   )r   r>   r@   None)r   r>   r@   rB   )r   r>   r	   r?   r@   'Generator[trio.CancelScope, None, None])r   r>   r	   r?   r@   rC   )
__future__r   r   sys
contextlibr   typingr   r   r   collections.abcr   r   r   r%   r'   r+   	Exceptionr-   r8   r;   modulesinspectc	Signaturefrom_callablereplacer   __signature__r$   r   r   <module>rQ      s&   "  
 % * ) 38 >(   	<>(9&9     -	 B    -	 J s{{z"!++99!<DDW[WgWgDh # r   