Wcd cs\ddlZddlZddlZddlZddlZddlmZdZdZdZ d dZ d d Z dS) N) constantscsztj|}tj|r$|j}|j|j fSt |tjrt|jSt |tjrt|jSdSN) inspectZunwrapZ isfunctionZ__code__Z co_filenameZco_firstlineno isinstance functoolspartial_get_function_sourcefuncZ partialmethod)r Zcode //usr/lib64/python3.12/asyncio/format_helpers.pyrr s >>$ D$}}  $"5"566$ ))**#DII..$ //00#DII.. 4cspt||d}t|}|r|d|dd|dz }|S)Nz at rz:r)_format_callbackr)r args func_reprZsources r _format_callback_sourcersH tT2I !$ 'F v3F1I33q 333 r csg}|r|jd|D|r)|jd|jDdjdj|S)zFormat function arguments and keyword arguments. Special case for a single parameter: ('hello',) is formatted as ('hello'). c3sFK|]}tj|dSrreprlibrepr).0Zargr r *_format_args_and_kwargs..&s+773W\\#&&&&&77r c3sVK|]#\}}|dtj|%dS)z=Nr)rZkZv r rr(s<II$!Q--GLLO------IIr z({})z, )ZextenditemsZformatZjoin)rkwargsrrr _format_args_and_kwargsrsg E t 77$7777 v II&,,.IIII ==5) **r cst|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__) rrrrr r rZkeywordsZhasattrrrr)r rrZsuffixrs r r r ,s$ ))**(v6? 499dmmVLLt^$$):):):%% z " "t}}}MM J  (v66I vV r cs| 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)limitZ lookup_lines) sysZ _getframeZf_backrZDEBUG_STACK_DEPTH tracebackZ StackSummaryZextractZ walk_stackZreverse)ZfrZstackrr extract_stackr!>sl y MMO " " }++  " " * *9+?+?+B168= + ?E MMOO Lr )r)NN) rrrrr rrrrrr r!)r r r"s     + + +$r