+
    Brh                     l    R t . ROt/ t/ tR tRR ltRR ltR tR tR t	R t
RR	 ltRR
 ltR tR tR# )zCache lines from Python source files.

This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
c                 .    \         P                  4        R# )zClear the cache entirely.N)cacheclear     &/usr/local/lib/python3.14/linecache.py
clearcacher      s    	KKMr   Nc                r    \        W4      p^Tu;8:  d   \        V4      8:  d   M R# W1^,
          ,          # R# )zzGet a line for a Python source file from the cache.
Update the cache if it doesn't contain an entry for this file already. )getlineslen)filenamelinenomodule_globalsliness   &&& r   getliner      s4     X.EF c%j  aZ  r   c                    V \         9   d2   \         V ,          p\        V4      ^8w  d   \         V ,          ^,          #  \        W4      #   \         d    \	        4        . u # i ; i)z}Get the lines for a Python source file from the cache.
Update the cache if it doesn't contain an entry for this file already.)r   r   updatecacheMemoryErrorr   )r   r   entrys   && r   r   r       sX     5hu:??1%%844 	s   
A	 	A#"A#c                 r    \        V 4      p^Tu;8:  d   \        V4      8:  d   M R# W!^,
          ,          # R# )   r
   )_getlines_from_coder   )r   r   r   s   && r   _getline_from_coder   0   s2    )EF c%j  aZ  r   c                 H    V P                   V P                  V P                  3# N)co_filenameco_qualnameco_firstlineno)codes   &r   	_make_keyr    6   s!    d..0C0CDDr   c                     \        V 4      pV\        9   d2   \        V,          p\        V4      ^8w  d   \        V,          ^,          # . # )r   )r    _interactive_cacher   )r   code_idr   s   &  r   r   r   9   s>    oG$$"7+u:?%g.q11Ir   c                    V '       * ;'       gI    V P                  R4      ;'       d0    V P                  R4      ;'       d    V P                  R4      '       * # )zAReturn True if the source code is unavailable for such file name.<><frozen )
startswithendswith)r   s   &r   _source_unavailabler*   B   sY      	5 	5$ 4 4!!#&4 4''
33	r   c                   V f$   \         P                  4       P                  4       pMV .pV F}  p  \         V ,          p\	        T4      ^8X  d   K#  Tw  r4rVTf   K.   ^ RIp TP                  T4      pY8P                  8w  g   YHP                  8w  g   Kg  \         P                  T R4       K  	  R#   \         d     K  i ; i  \         d      R# i ; i  \        \        3 d    \         P                  T R4        K  i ; i)zQDiscard cache entries that are out of date.
(This is not checked upon each call!)N)r   copykeysKeyErrorr   osImportErrorstatOSError
ValueErrorpopst_sizest_mtime)	r   	filenamesr   sizemtimer   fullnamer/   r1   s	   &        r   
checkcacher;   L   s     JJL%%'	J		(OE u:?',$U=		778$D <<5MM#9IIh%/   		  		 $ 	IIh%	s5   B0C!C0B?>B?CC'D ?D c                    ^ RI p^ RIp^ RIpT \        9   d2   \        \        T ,          4      ^8w  d   \        P                  T R4       \        T 4      '       d   . # T P                  R4      '       d   Te   TP                  R4      pTf   . # MT p TP                  T4      p TP)                  T4      ;_uu_ 4       pTP+                  4       pRRR4       X'       g   R.pM3TR,          P1                  R4      '       g   TR;;,          R,          uu&   TP2                  TP4                  rYY3\        T &   T#   \         d    . u # i ; i  \         EdB    T p\        Y4      '       d    \        T ,          ^ ,          ! 4       pTf   . u # \        T4      RTP                  4        U	u. uF  qR,           NK  	  Mu up	i up	T3\        T &   \        T ,          ^,          u #   \        \        3 d     Mi ; iTP                  P                  T 4      '       d   . u # TP                   Fe  p
 TP                  P!                  Y4      pM  \"        \$        3 d     K4  i ; i TP                  T4      p  EK    \        \&        3 d     Kc  i ; i	  . u # \&         d    . u # i ; i  + '       g   i     EL; i  \        \,        \.        3 d    . u # i ; i)zUpdate a cache entry and return its list of lines.
If something's wrong, print a message, discard the cache entry,
and return an empty list.Nr'   __file__
)r/   systokenizer0   r   r   r4   r*   r(   getr1   r2   	lazycache
splitlinespathisabsjoin	TypeErrorAttributeErrorr3   open	readlinesUnicodeDecodeErrorSyntaxErrorr)   r5   r6   )r   r   r/   r@   rA   r:   r1   basenamedatalinedirnamefpr   r8   r9   s   &&             r   r   r   p   s   
 5uX1$IIh%8$$	:&&>+E "%%j1I  ,wwx X]]8$$LLNE % 2Y%%b	T	,,%52E(OLU  	(  ( X..*Xq)+ < II-1__->?->TD[[->?	#h Xq))  ) " 77==""IxxG77<<:~. wwx(Z(    I 	 %$$'5 	s   D: E %J? >J+J? :E
	E
J(-G$J(J(+F=
<&J($G85J(7G88#J(J( J(0IJ(I!J( I!!J(%I;6J(;JJ(JJ(J("J('J(+J<	6J? <J? ?KKc                  a V \         9   d    \        \         V ,          4      ^8X  d   R# R# V '       d/   V P                  R4      '       d   V P                  R4      '       d   R# V'       d   RV9   d   VP	                  R4      p\        VRR4      ;'       g
    VR,          p\        VR	R4      pVf   VP	                  R
4      p\        VRR4      oV'       d   S'       d   V3V3R llpV3\         V &   R# R# )a  Seed the cache for filename with module_globals.

The module loader will be asked for the source only when getlines is
called, not immediately.

If there is an entry in the cache already, it is not altered.

:return: True if a lazy load is registered in the cache,
    otherwise False. To register such a load a module loader with a
    get_source method must be found, the filename must be a cacheable
    filename, and the filename must not be already cached.
TFr%   r&   __name____spec__nameNloader
__loader__
get_sourcec                    < S! V .VO5/ VB # r   r   )rV   argskwargsrY   s   &*,r   	get_lineslazycache.<locals>.get_lines   s    !$8888r   )r   r   r(   r)   rB   getattr)r   r   specrV   rW   r]   rY   s   &&    @r   rC   rC      s     5uX1$++C00X5F5Fs5K5K*6!!*-tVT*HHnZ.Hx.>#''5FV\48
J# 9(lE(Or   c                 V   \        V4      R VP                  4        Uu. uF  q3R,           NK  	  upV3pV .pV'       df   VP                  4       p V P                   F1  p\	        V\        V 4      4      '       g   K   VP                  V4       K3  	  V\        \        V 4      &   Km  R # u upi )Nr>   )	r   rD   r4   	co_consts
isinstancetypeappendr"   r    )r   stringrV   rP   r   stackconsts   &&&    r   _register_coderi      s    [&,&7&7&9:&9dTkk&9:E FE
yy{^^E%d,,U# $ /49T?+  ;s   B&)r   r   r;   rC   r   )__doc____all__r   r"   r   r   r   r   r    r   r*   r;   r   rC   ri   r   r   r   <module>rl      sZ    ?
 	 
 E!&HVr"H4r   