Wcd \ddlZddlZddlZddlZddlZddlmZdZdZdZ d dZ d d Z dS) N) constantscztj|}tj|r$|j}|j|j fSt |tjrt|jSt |tjrt|jSdSN) inspectunwrap isfunction__code__ co_filenameco_firstlineno isinstance functoolspartial_get_function_sourcefunc partialmethod)rcodes //usr/lib64/python3.12/asyncio/format_helpers.pyrr s >>$ D$}}  $"5"566$ ))**#DII..$ //00#DII.. 4cpt||d}t|}|r|d|dd|dz }|S)Nz at r:r)_format_callbackr)rargs func_reprsources r_format_callback_sourcersH tT2I !$ 'F v3F1I33q 333 rcg}|r|jd|D|r)|jd|jDdjdj|S)zFormat function arguments and keyword arguments. Special case for a single parameter: ('hello',) is formatted as ('hello'). c3FK|]}tj|dSrreprlibrepr).0args r z*_format_args_and_kwargs..&s+773W\\#&&&&&77rc3VK|]#\}}|dtj|%dS)=Nr)r"kvs rr$z*_format_args_and_kwargs..(s<II$!Q--GLLO------IIrz({})z, )extenditemsformatjoin)rkwargsr*s r_format_args_and_kwargsr.sg E t 77$7777 v II&,,.IIII ==5) **rct|tjr?t|||z}t |j |j |j|St|dr|jr |j}n4t|dr|jr |j}n t|}|t||z }|r||z }|S)N __qualname____name__) r rrr.rrrkeywordshasattrr1r2r!)rrr-suffixrs rrr,s$ ))**(v6? 499dmmVLLt^$$):):):%% z " "t}}}MM J  (v66I vV rc| tjj}|tj}t j jt j||d}|j|S)zlReplacement for traceback.extract_stack() that only does the necessary work for asyncio debug mode. NF)limit lookup_lines) sys _getframef_backrDEBUG_STACK_DEPTH traceback StackSummaryextract walk_stackreverse)fr7stacks r extract_stackrD>sl y MMO " " }++  " " * *9+?+?+B168= + ?E MMOO Lr)r/)NN) rrr r9r=r/rrrr.rrDrrrFs     + + +$r