+
    Fil                     r    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 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                    \         P                  V R4      pVe   \        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.N)r   getr   updatecacheMemoryErrorr   )r   r   entrys   && r   r   r       sV     IIh%ESZ1_Qx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   /   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!   5   s!    d..0C0CDDr   c                     \        V 4      p\        P                  VR 4      pVe   \        V4      ^8w  d
   V^,          # . # r   )r!   _interactive_cacher   r   )r    code_idr   s   &  r   r   r   8   s;    oG""7D1ESZ1_Qx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+   @   sY      	5 	5$ 4 4!!#&4 4''
33	r   c                   V f$   \         P                  4       P                  4       pMV .pV F  p \         P                  V R4      pVe   \	        V4      ^8X  d   K/  Vw  r4rVVf   K:   ^ RIp TP                  T4      pY8P                  8w  g   YHP                  8w  g   Ks  \         P                  T R4       K  	  R#   \         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keysr   r   osImportErrorstatOSError
ValueErrorpopst_sizest_mtime)	r   	filenamesr   sizemtimer   fullnamer/   r1   s	   &        r   
checkcacher;   J   s     JJL%%'	J			(D)=CJ!O',$U=		778$D <<5MM#9IIh%'   		 $ 	IIh%	s$   (B<-C<CC'C:9C:c                    ^ RI p^ RIp^ RIp\        P                  T R4      p\        T 4      '       d   . # T P                  R4      '       d   Tf   . # 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                  ppTTY3\        T &   T#   \         d    . u # i ; i  \         EdH    T pTe   \        T4      ^8X  d   TMRp	T	f   \        Y4      p	T	e|    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pT\        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   r4   r+   r)   r   r1   r2   r   _make_lazycache_entry
splitlinespathisabsjoin	TypeErrorAttributeErrorr3   open	readlinesUnicodeDecodeErrorSyntaxErrorr*   r5   r6   )r   r   r/   r@   rA   r   r:   r1   basename
lazy_entrydatalinedirnamefpr   r8   r9   s   &&               r   r   r   j   s   
 IIh%E8$$	:&& !I!%%j1I  0wwx `]]8$$LLNE % 2Y%%b	T	,,%DE52E(OL_  	*  , $/CJ!OU
.xHJ! !!} < II-1__->?->TD[[->?	 #(hQx  ) $ 77==""IxxG77<<:~. wwx(Z(    I 	 %$$'5 	s   D /D+ J# J+J# D('D(+9J%G3J;JF*
)JGJG#J JJH0/J0IJIJ	IJI40J3I44J=JJJJ 	J#  J# #J>=J>c                    \         P                  V R4      pVe   \        V4      ^8H  # \        W4      pVe   V\         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.
NTF)r   r   r   rB   )r   r   r   rN   s   &&  r   	lazycacherT      sG     IIh%E5zQ&x@J$hr   c                   a 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# R# )
r&   r'   N__name____spec__nameloader
__loader__
get_sourcec                    < S! V .VO5/ VB # r   r   )rX   argskwargsr[   s   &*,r   	get_lines(_make_lazycache_entry.<locals>.get_lines   s    !$8888r   )r)   r*   r   getattr)r   r   specrX   rY   r_   r[   s   &&    @r   rB   rB      s    ++C00X5F5Fs5K5K*6!!*-tVT*HHnZ.Hx.>#''5FV\48
J# 9<r   c                 Z   \        V4      R VP                  4        Uu. uF  q3R,           NK  	  upV3pV .pV'       dh   VP                  4       p V P                   F1  p\	        V\        V 4      4      '       g   K   VP                  V4       K3  	  \        V 4      pV\        V&   Ko  R # u upi )Nr>   )	r   rC   r4   	co_consts
isinstancetypeappendr!   r#   )r    stringrX   rP   r   stackconstkeys   &&&     r   _register_coderl      s    [&,&7&7&9:&9dTkk&9:E FE
yy{^^E%d,,U# $ o"'3  ;s   B()r   r   r;   rT   r   )__doc____all__r   r#   r   r   r   r   r!   r   r+   r;   r   rT   rB   rl   r   r   r   <module>ro      s^    ?
 	 
E&@[|0((r   