+
    yj                    X   ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RIH
t
 ^ RIt^ RIt]
'       d   ^ RIHt  ! R	 R
4      tR R lt]P"                  ! RRR7      R R l4       t]P"                  ! RRR7      R R l4       t]P"                  ! RRR7      R R l4       tR# )    )annotationsN)TracebackType)Any)Callable)	Generator)TYPE_CHECKING)Selfc                  J    ] tR t^tRtR R ltR R ltR R ltR R	 ltR
t	R# )catch_threading_exceptiona  Context manager catching threading.Thread exception using
threading.excepthook.

Storing exc_value using a custom hook can create a reference cycle. The
reference cycle is broken explicitly when the context manager exits.

Storing thread using a custom hook can resurrect it if it is set to an
object which is being finalized. Exiting the context manager clears the
stored object.

Usage:
    with threading_helper.catch_threading_exception() as cm:
        # code spawning a thread which raises an exception
        ...
        # check the thread exception: use cm.args
        ...
    # cm.args attribute no longer exists at this point
    # (to break a reference cycle)
c                   V ^8  d   QhRR/# )   returnNone )formats   "K/var/www/html/2rare/lib/python3.14/site-packages/_pytest/threadexception.py__annotate__&catch_threading_exception.__annotate__)   s     P P$ P    c                	"    R V n         R V n        R # N)args	_old_hookselfs   &r   __init__"catch_threading_exception.__init__)   s    59	KOr   c                    V ^8  d   QhRRRR/# )r   r   zthreading.ExceptHookArgsr   r   r   )r   s   "r   r   r   -   s      2 t r   c                	    Wn         R # r   )r   )r   r   s   &&r   _hookcatch_threading_exception._hook-   s    	r   c                   V ^8  d   QhRR/# )r   r   r	   r   )r   s   "r   r   r   0   s      4 r   c                	Z    \         P                  V n        V P                  \         n        V # r   )	threading
excepthookr   r    r   s   &r   	__enter__#catch_threading_exception.__enter__0   s     "--#zz	r   c               (    V ^8  d   QhRRRRRRRR/# )	r   exc_typeztype[BaseException] | Noneexc_valzBaseException | Noneexc_tbzTracebackType | Noner   r   r   )r   s   "r   r   r   5   s2     	 	,	 &	 %		
 
	r   c                	b    V P                   f   Q hV P                   \        n        R V n         V =R # r   )r   r$   r%   r   )r   r)   r*   r+   s   &&&&r   __exit__"catch_threading_exception.__exit__5   s,     ~~)))#~~	Ir   )r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r    r&   r-   __static_attributes__r   r   r   r   r      s!    (P
	 	r   r   c                   V ^8  d   QhRR/# r   r   zGenerator[None, None, None]r   )r   s   "r   r   r   A   s     Q Q'B Qr   c               #    "   \        4       ;_uu_ 4       p  R x  V P                  '       d   V P                  P                  f   RMV P                  P                  P                  pRV R2pVRP	                  \
        P                  ! V P                  P                  V P                  P                  V P                  P                  4      4      ,          p\        P                  ! \        P                  ! V4      4       R R R 4       R #   T P                  '       d   T P                  P                  f   RMT P                  P                  P                  pRT R2pTRP	                  \
        P                  ! T P                  P                  T P                  P                  T P                  P                  4      4      ,          p\        P                  ! \        P                  ! T4      4       i i ; i  + '       g   i     R # ; i5i)Nz	<unknown>zException in thread z

 )r   r   threadnamejoin	tracebackformat_exceptionr)   	exc_valueexc_tracebackwarningswarnpytest%PytestUnhandledThreadExceptionWarning)cmthread_namemsgs      r   thread_exception_runtest_hookrG   A   sw    	"	$	$	Qwww#%77>>#9Krww~~?R?R  -[M>rww..(())--  fJJ3OP! 
%	$ www#%77>>#9Krww~~?R?R  -[M>rww..(())--  fJJ3OP 	 
%	$	$s4   HG7DC&G7
HC)G44G77H		HT)wrappertrylastc                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r   V   s     / /9 /r   c               #  6   "   \        4        R j  xL
  R #  L5ir   rG   r   r   r   pytest_runtest_setuprM   U        ,...   )rH   tryfirstc                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r   [   s     / /8 /r   c               #  6   "   \        4        R j  xL
  R #  L5ir   rL   r   r   r   pytest_runtest_callrS   Z   rN   rO   c                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r   `   s     / /!< /r   c               #  6   "   \        4        R j  xL
  R #  L5ir   rL   r   r   r   pytest_runtest_teardownrV   _   rN   rO   )
__future__r   r$   r<   typesr   typingr   r   r   r   r@   rB   typing_extensionsr	   r   rG   hookimplrM   rS   rV   r   r   r   <module>r\      s    "           &* *ZQ( t,/ -/ -/ ./ -/ ./r   