Wcc ddlZddlZddlmZdZGddeZejZdZ dZ da dZ d d Z dS) N)wrapsTceZdZdZdZdS)_InterruptHandlercd|_||_t|trM|tj krtj }n&|tjkrd}n td||_ dS)NFcdSN) unused_signum unused_frames )/usr/lib64/python3.12/unittest/signals.pydefault_handlerz3_InterruptHandler.__init__..default_handlersDzYexpected SIGINT signal handler to be signal.SIG_IGN, signal.SIG_DFL, or a callable object) calledoriginal_handler isinstanceintsignalSIG_DFLdefault_int_handlerSIG_IGN TypeErrorr )selfr s r __init__z_InterruptHandler.__init__ s / os + +&..00"("<"< FNN22 !233 /rc"tjtj}||ur|j|||jr|j||d|_t j D]}|jdS)NT)r getsignalSIGINTr r_resultskeysstop)rsignumframeinstalled_handlerresults r __call__z_InterruptHandler.__call__s",,V]]; D ( (   / / ;;;   / / mmo  F KKMMM  rN)__name__ __module__ __qualname__rr$r rr rr s2///$     rrcdt|<dS)N)rr#s r registerResultr+*sHVrcHttj|dSr)boolrpopr*s r removeResultr/-s  VT* ++rctatjtj}t |atjtjtdSdSr)_interrupt_handlerrrrr)r s r installHandlerr21sK! **6==9.? fmm%78888"!rctfd}|St8tjtjtjdSdS)Nc tjtj}t |i|tjtj|S#tjtj|wxYwr)rrr removeHandler)argskwargsinitialmethods r innerzremoveHandler..inner;sn&&v}}5G OO 6vt.v.. fmmW555 fmmW555555s A$$)B )rr1rrr)r9r:s` r r5r59sg  v 6 6 6 6  6 % fmm%7%H%HIIII&%rr)rweakref functoolsr __unittestobjectrWeakKeyDictionaryrr+r/r1r2r5r rr r@s   @ %7 $ $ &,,,999JJJJJJr