python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
trace.cpython-312.opt-2.pyc

ˑer	ddgZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
ZddlZdZGddZdZd	ZGd
dZdZdZdd
ZdZGddZdZedk(reyy)TraceCoverageResultsN)	monotonicz#pragma NO COVERceZdZddZdZy)_IgnoreNc|s
tn
t||_|sgn,|Dcgc]!}tjj	|#c}|_ddi|_ycc}w)Nz<string>)set_modsospathnormpath_dirs_ignore)selfmodulesdirsds    9/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/trace.py__init__z_Ignore.__init__FsR")SUs7|
#R37*9./+-''*:*:1*=*9
#Q(*9s&Ac||jvr|j|S||jvrd|j|<y|jD]'}|j|dzsd|j|<y|d|j|<y|jD]5}|j|tj
zs&d|j|<yd|j|<y)Nr	.r)rr
startswithrrsep)rfilename
modulenamemodrs     rnamesz
_Ignore.namesLs%<<
++#'(DLL$::	C$$S3Y/+,Z(
	'(DLL$
	A""1rvv:.+,Z(
	$%Z NN)__name__
__module____qualname__rrrrrrEs))rrc	tjj|}tjj|\}}|SN)rr
basenamesplitext)r
baserexts    r_modnamer+ws66
77D!DGG$$T*MHcOrc	tjj|}d}tjD]m}tjj|}|j	|s4|t|tjk(sTt|t|kDsl|}o|r|t|dzd}n|}tjj|\}}|jtjd}tjr |jtjd}tjj|\}}|jdS)Nr	r)rr
normcasesysrlenr
splitdrivereplacealtsepr(lstrip)r
comparepathlongestdirr)driverr*s        r_fullmodnamer9~s6''""4(KGxxggs#!!#&;s3x+@BFF+J3x#g,&	CL1$%&''$$T*KE4<<$D	yy||BIIs+GG$$T*MHc??3rc4eZdZ		ddZdZdZddZd	dZy)
rNc||_|ji|_|jj|_||_|ji|_|jj|_||_|ji|_|jj|_||_||_|j
r]	t|j
d5}tj|\}}}ddd|j|j|||yy#1swY.xYw#tttf$r5}td|j
d|t j"Yd}~yd}~wwxYw)Nrb)callerszSkipping counts file : file)countscopycountercalledfuncsr=infileoutfileopenpickleloadupdate	__class__OSErrorEOFError
ValueErrorprintr/stderr)rrArDrEr=rFferrs        rrzCoverageResults.__init__sC;;DK{{'')&#!D++002<<DL||((*;;
N$++t,B39;;q>0FKBDNN6;NPQBBXz2
N)-c;BE**NN
Ns0D0D$7+D0$D-)D00E9+E44E9cL	|jdxr|jdS)N<>)rendswith)rrs  ris_ignored_filenamez#CoverageResults.is_ignored_filenames*	""3'BH,=,=c,BBrc
	|j}|j}|j}|j}|j}|j}|D]}|j|d||z||<|D]}d||<	|D]}d||<	yNrr	)rArDr=get)	rotherrArDr=other_countsother_calledfuncs
other_callerskeys	         rrJzCoverageResults.updates<&&,,||!--


	AC **S!,|C/@@F3K	A%	!C K	!!	CGCL	rcJ	|jrIttd|j}t|D]\}}}td|d|d||jrttddx}}	t|jD]\\\}
}}\}
}}|
|k7rttd|
d|
}d}	|
|
k7r|	|
k7rtd|
|
}	td	|d
|d|d
|^i}|jD]0\}}|j|ix}||<|j||f||<2i}|j
D]r\}}|j|r|jdr|dd
}|Htjjtjj|}t|}nA|}tjj|stj|t!|}|rt#|}ni}t%j&|}tjj)||dz}t+|d5}t-j.|j0\}}ddd|j3||||\}}|sU|sYt5d|z|z}||||f||<u|r8|r6tdt|D]}||\}}}}td||z|j6rY	t+|j6d5} t9j:|j|j|jf| ddddyy#1swYxYw#1swYyxYw#t<$r(}!td|!zt>j@Yd}!~!yd}!~!wwxYw)Nzfunctions called:z
filename: z, modulename: , funcname: zcalling relationships:r-z***z  -->z    rz -> z.pycz.coverr<dzlines   cov%   module   (path)z%5d   %3d%%   %s   (%s)wbr	z"Can't save counts files because %sr?)!rDrOsortedr=rArZitemsrWrVrr
dirnameabspathr+existsmakedirsr9_find_executable_linenos	linecachegetlinesjoinrGtokenizedetect_encodingreadlinewrite_results_fileintrFrHdumprLr/rP)"rshow_missingsummarycoverdircallsrrfuncnamelastfile	lastcfilepfilepmodpfunccfilecmodcfuncper_filelineno	lines_hitsumscountr7lnotabsource	coverpathfpencoding_n_hitsn_linespercentmrQrRs"                                  r
write_resultszCoverageResults.write_resultss	G%&$$E28-
<.*h"J:<
<<<G*+#%%Hydll+

I<%%u';tUH$G%.$H "IE>i5&8'5) %IdE4GH

I $	@Hf-5\\(B-GGI* $Xv,> ?If	@
'~~/	JOHe''1  (#CR=ggoobggooh&?@%h/
ww~~c*KK$)(3
1(;''1FS*x*?@Ih%
D&66r{{C!
D"55i6<eXOOFG7cFlW45#*GZ#IZ =	JBt23D\
;9=a6*h/$q'9:
;<<
S$,,-&KKd.>.> M !1&&&
D
D$&&
S:S@szzRR
SsB#MM19M%M1M"	%M.*M1.M11	N":NN"c		t|d|}d}d}	|5t|d	D]\}
}|
|vr"|j
d
||
z|	d	z
}	|d	z
}n4|
|vrt|vr|j
d|d	z
}n|j
d|j
|jd
	ddd|	|fS#t$r,}td|d|dtjYd}~yd}~wwxYw#1swY|	|fSxYw)Nwrztrace: Could not open z for writing: z - skippingr?)rrrr	z%5d: z>>>>>> z       )	rGrLrOr/rP	enumeratewritePRAGMA_NOCOVER
expandtabs)rr
linesrrrrFrRrrrlines            rrrz"CoverageResults.write_results_file)s5	4x8G
	2 )% 3
2Y&MM'If,="=>aKFqLGv%n.DMM),qLGMM),

dooa01
2	2"w1	26=DGJJ
P		2"ws#B3BC+3	C(<"C##C(+C7)NNNNN)TFNr&)r!r"r#rrWrJrrrr$rrrrs&=A'+N4C$ZSxrcZ	i}tj|D]\}}||vsd||<|S)Nr	)disfindlinestarts)codestrslinenosrrs     r_find_lines_from_coderIs@DG''- 	6GFO Nrc	t||}|jD]3}tj|s|j	t||5|Sr&)r	co_constsinspectiscoderJ_find_lines)rrrcs    rrrSsLF#D$/G^^1>>!NN;q$/01Nrcb	i}tj}t||5}tj|j
}|D]S\}}}}	}
|tjk(r6|tjk(r#|\}}|	\}
}t||
dzD]}d||<	|}U	ddd|S#1swY|SxYw)Nrr	)tokenINDENTrGrogenerate_tokensrqSTRINGrange)rrr
prev_ttyperQtokttypetstrstartendrslinescolelineecolis                r
_find_stringsr_s	AJ	
h	*	a&&qzz2-0	)E4T$-"'KE4"%KE4"5%!)4! !!J		
H	
HsA8B$$B.cN		tj|5}|j}|j}dddt|d}t|}t||S#1swY.xYw#t$r-}td|d|tjicYd}~Sd}~wwxYw)NzNot printing coverage data for r>r?exec)rorGreadrrLrOr/rPcompilerr)rrQprogrrRrrs       rrkrkvsK
]]8
$	"668DzzH	"46*D8,DtT""	"	"
!)307:zz	C	s3A.A"A."A+'A..	B$7"BB$B$c^eZdZ			ddZdZddZdZdZdZdZ	d	Z
d
ZdZdZ
d
Zy)rNc
	||_||_t|||_i|_i|_d|_||_i|_i|_	i|_
d|_|	rt|_|r|j|_y|r|j|_y|r%|r#|j |_|j"|_y|r#|j |_|j&|_y|r#|j |_|j(|_yd|_yrY)rErFrignorerApathtobasename	donothingtrace_calledfuncs_callers
_caller_cache
start_time_timeglobaltrace_trackcallersglobaltraceglobaltrace_countfuncsglobaltrace_ltlocaltrace_trace_and_count
localtracelocaltrace_tracelocaltrace_count)
rrr
countfuncscountcallers
ignoremods
ignoredirsrErFtimings
          rrzTrace.__init__s	"j*5 

#gDO#<<D
#::D
u#22D"==DO
#22D"33DO
#22D"33DODNrcJddl}|j}|j|||y)Nr)__main____dict__runctx)rcmdrdicts    rrunz	Trace.runs   Ct$rc|i}|i}|js>tj|jt	j|j	t||||js+t	jdtjdyy#|js+t	jdtjdwwxYwr&)r	threadingsettracerr/r)rrglobalslocalss    rrzTrace.runctxs?bG>B6~~t//0LL))*	)gv&>>T"""4("4>>T"""4("s
B9Ccd}|jstj|j	||i|}|jstjd|S#|jstjdwwxYwr&)rr/rr)rfuncargskwresults     rrunfuncz
Trace.runfuncsh~~LL))*	#4&2&F>>T"
>>T""sA$A>c|j}|j}|rt|}nd}|j}d}||jvr |j||j|}nd|j|<tj|Dcgc]}tj|r|}}t|dk(rtj|dD	cgc]}	t|	tr|	}
}	t|
dk(r]tj|
dDcgc]}t|dr|}}t|dk(r|dj}||j|<||d|}|||fScc}wcc}	wcc}w)Nr	r	__bases__r)f_codeco_filenamer+co_namergc
get_referrersr
isfunctionr0
isinstancerhasattrr!)
rframerrrryclsnamerQfuncsrdictsrclassess
             rfile_module_function_ofzTrace.file_module_function_ofs||##!(+JJ<<4%%%!!$'3,,T2'+Dt$!# 0 0 631#..q13E3
5zQ$&$4$4U1X$>5q *1d 355u:?*,*:*:58*D?Q&-a&= !?G?7|q(")!*"5"5
4;**40")84HX---35?sE'E,E1c	|dk(r>|j|}|j|j}d|j||f<yyNcallr	)rf_backr)rrwhyarg	this_funcparent_funcs      rrzTrace.globaltrace_trackcallerssL	&=44U;I66u||DK67DMM;	23	rcR	|dk(r!|j|}d|j|<yyr)rr)rrrrrs     rrzTrace.globaltrace_countfuncss5	&=44U;I+,Di(rc&	|dk(r|j}|jjdd}|r`t|}|R|jj||}|s3|jrtd|d|j|jSyyyy)Nr__file__z --- modulename: ra)
r	f_globalsrZr+rrrrOrr)rrrrrrr	ignore_its        rrzTrace.globaltrace_lts	
&=<<D**:t<H&h/
) $ 1 1(J GI$::!&0$,,$@B#.	%*rc	|dk(r|jj}|j}||f}|jj	|ddz|j|<|j
r%t
dt|j
z
zdtjj|}t
d||tj||fzd|jS)	Nrrr	%.2f r
%s(%d): %sr-)rrf_linenorArZrrOrrr
r'rlgetliner)rrrrrrr_bnames        rrz Trace.localtrace_trace_and_count(s&=||//H^^FF"C#{{sA6:DKKf$// 9:DGG$$X.E,%"+"3"3Hf"E"GGLN
Prc	V|dk(r|jj}|j}|jr%t	dt|jz
zdtjj|}t	d||tj||fzd|jS)Nrrr	r
rr-)rrrrrOrrr
r'rlr
r)rrrrrrrs       rrzTrace.localtrace_trace7s&=||//H^^Ff$// 9:DGG$$X.E,%"+"3"3Hf"E"GGLN
Prc|dk(rR|jj}|j}||f}|jj	|ddz|j|<|j
S)Nrrr	)rrrrArZr)rrrrrrr_s       rrzTrace.localtrace_countDsW&=||//H^^FF"C#{{sA6:DKKrct|j|j|j|j|j
S)N)rErFrDr=)rrArErFrr)rs rresultsz
Trace.resultsLs2t{{4;;'+||+/+<+<'+}}6	6r)	r	r	rrr$r$NNFr )r!r"r#rrrrrrrrrrrrr$rrrrsIDEDH0d%
)	'.R	8-.
6rcddl}|j}|jddd|jdd}|jdd	d
d|jd
dd
d|jddd
d|jddd
d|jd}|j	}|jddd
d|jddd
d|jddd |jd!d"d# |jd$d%d
d&|jd'd(d
d)|jd*d+d
d,|jd-d.}|jd/d0gd12|jd3d0gd42|jd5d
d6d72|jd8d9d:;|jd<|j
d=;|j
}|jr*tjd>tjd?fd@}|jDcgc](}|jdAD]}|j*c}}|_
|jDcgc].}|jtjD]
}||0c}}|_|jro|j s|j#dBt%|j |j C}	|	j'|j(|j*|j,St/|j0|j2|j4|j6gs|j#dD|j4r)|j2s|j0r|j#dE|j*r|j2s|j#dF|j8|j#dGt;|j2|j0|j4|j6|j|j|j |j |j<H	}
	|j>roddl }|j8}|jC|\}
}}|jDg|jFtH_%dI|jD|jL|jN|ddJ}n|j8g|jFtH_%tjPjS|j8tHjPd<tUjV|j85}tY|j[|j8dK}ddd|j8dIdddL}|
j]|||
je}	|jfs2|	j'|j(|j*|j,yycc}}wcc}}w#1swYxYw#t^$r6}tIj`dMtHjJddN|Yd}~d}~wtb$rYwxYw)ONrz	--versionversionz	trace 2.0)actionrzMain optionsz(One of these (or --report) must be givenz-cz--count
store_truezCount the number of times each line is executed and write the counts to <module>.cover for each module executed, in the module's directory. See also --coverdir, --file, --no-report below.)rhelpz-tz--tracez3Print each line to sys.stdout before it is executedz-lz--listfuncszKeep track of which functions are executed at least once and write the results to sys.stdout after the program exits. Cannot be specified alongside --trace or --count.z-Tz--trackcallsz^Keep track of caller/called pairs and write the results to sys.stdout after the program exits.	Modifiersz-rz--reportzGenerate a report from a counts file; does not execute any code. --file must specify the results file to read, which must have been created in a previous run with --count --file=FILEz-Rz--no-reportz^Do not generate the coverage report files. Useful if you want to accumulate over several runs.z-fz--filez+File to accumulate counts over several runs)rz-Cz
--coverdirzDirectory where the report files go. The coverage report for <package>.<module> will be written to file <dir>/<package>/<module>.coverz-mz	--missingz?Annotate executable lines that were not executed with ">>>>>> "z-sz	--summaryz\Write a brief summary for each file to sys.stdout. Can only be used with --count or --reportz-gz--timingzQPrefix each line with the time since the program started. Only used while tracingFilterszCan be specified multiple timesz--ignore-moduleappendzqIgnore the given module(s) and its submodules (if it is a package). Accepts comma separated list of module names.)rdefaultrz--ignore-dirzWIgnore files in the given directory (multiple directories can be joined by os.pathsep).z--moduleFzTrace a module. progname?zfile to run as main program)nargsr	argumentszarguments to the programstdlib
platstdlibctjjtjj|}|j	dj	d}tjj|S)Nz$prefixz$exec_prefix)rr

expanduser
expandvarsr2r)s_exec_prefix_prefixs rparse_ignore_dirzmain.<locals>.parse_ignore_dirsXGGrww11!45
IIi)11.,Oww""r,z-r/--report requires -f/--file)rErFzLmust specify one of --trace, --count, --report, --listfuncs, or --trackcallsz8cannot specify both --listfuncs and (--trace or --count)z3--summary can only be used with --count or --reportz3progname is missing: required with the main options)rrrrrErFrr)r!r__package__
__loader____spec__
__cached__r)rr!r*r-zCannot run file z
 because: )4argparseArgumentParseradd_argumentadd_argument_groupadd_mutually_exclusive_group	REMAINDER
parse_args
ignore_dir	sysconfigget_path
ignore_modulesplitstriprpathsepreportr@errorrrmissingrvrwanyrr	listfuncs
trackcallsrrrmodulerunpy_get_module_detailsrrr/argvparentloaderr
rgio	open_coderrrrLexit
SystemExitr	no_report)r.parsergrp_grpoptsr(rrr%rtrCmodule_namemod_namemod_specrglobsrrRr&r's                   @@rmainrVRs

$
$
&F
I{K

#
#N68CT9\&'
T9\FHT=EFT>,78
#
#K
0C++-DdJ| 
	dM,GHT8>@T<23T;|T;|=>T:l+,
#
#I-/C&x!"^HbGH
</1

#.0
8+=+=+-D$$X. )),7#$(#5#5OO:=))+O+OD!%N9LN45(*N*NDO{{yyLL9:!DIIF$$T\\4<<OO

DJJHI4	5~~4::OP||DJJJK}}JK
djj$**??t7I7Iii	5A
;;--K','@'@'M$Hh((:4>>:CH& ,,'&oo$"
E

77CH''//$--8CHHQKdmm,
Arwwy$--@
A!MM&#"	E	
ue$iikG>>dllDLL$--HONX
A
AHSXXa[#FGG

sC!-W&&3W,C6W>&W2+,W>2W;7W>>	Y,X88YYrr&)__all__rHrlrr/r6rrorrrrHtimerrrrrr+r9rrrrrkrrVr!r$rr<module>rYs<(%
&		
	

##00d 8mm^

.#L6L6\PIdZFr