
    ,hV                       d dl mZ d dlZd dlZd dlmZ d dlmZmZ d dl	Z	erd dl
mZ ddddZdd	 	 	 	 	 dd	Zdd
ZddZddZ G d de      Zedd	 	 	 	 	 dd       Zedd	 	 	 	 	 dd       Zdej*                  v rHd dlZeefD ]<  Zej0                  j3                  e      j5                  e	j6                        e_        > yy)    )annotationsN)contextmanager)TYPE_CHECKINGNoReturn)	GeneratorFshieldc               0    t        j                  | |      S )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     P/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/trio/_timeouts.py
move_on_atr      s     Xf==    c                   | dk  rt        d      t        j                  |       rt        d      t        j                  ||       S )a  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      sH    ( {9::zz'455! r   c                 t   K   t         j                  j                  d        d{    t        d      7 w)zPause execution of the current task forever (or until cancelled).

    Equivalent to calling ``await sleep(math.inf)``, except that if manually
    rescheduled this will raise a `RuntimeError`.

    Raises:
      RuntimeError: if rescheduled

    c                J    t         j                  j                  j                  S )N)r   lowlevelAbort	SUCCEEDED)_s    r   <lambda>zsleep_forever.<locals>.<lambda>G   s    8K8K8U8U r   Nz#Should never have been rescheduled!)r   r   wait_task_rescheduledRuntimeError r   r   sleep_foreverr$   =   s3      --
-
-.U
VVV
<
== Ws   $868c                t   K   t        |       5  t                d{    ddd       y7 # 1 sw Y   yxY ww)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&   K   s8       
H	 o  s    8,*,	8,58c                   K   | dk  rt        d      | dk(  r't        j                  j                          d{    yt	        t        j
                         | z          d{    y7 .7 w)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!   7A,A((A,"A*#A,*A,c                      e Zd ZdZy)TooSlowErrorzRRaised by :func:`fail_after` and :func:`fail_at` if the timeout
    expires.

    N)__name__
__module____qualname____doc__r#   r   r   r,   r,   r   s    r   r,   c             #  |   K   t        | |      5 }| ddd       j                  rt        y# 1 sw Y   xY ww)a  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_atr4   y   sA     8 
HV	,      <0<9<c             #  |   K   t        | |      5 }| ddd       j                  rt        y# 1 sw Y   xY ww)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   r2   r,   )r   r	   r3   s      r   
fail_afterr7      sA     : 
wv	. %  r5   sphinx)return_annotation)r   floatr	   boolreturntrio.CancelScope)r   r:   r	   r;   r<   r=   )r<   r   )r   r:   r<   None)r   r:   r<   r>   )r   r:   r	   r;   r<   'Generator[trio.CancelScope, None, None])r   r:   r	   r;   r<   r?   )
__future__r   r   sys
contextlibr   typingr   r   r   collections.abcr   r   r   r$   r&   r*   	Exceptionr,   r4   r7   modulesinspectc	Signaturefrom_callablereplacer   __signature__r#   r   r   <module>rM      s-   "  
 % * ) 38 >(   	<>(9&9     -	 B    -	 J s{{z" i!++99!<DDW[WgWgDhi r   