+
    il  c                   sr    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                 s.    \         P                  4        R# )zClear the cache entirely.N)cacheZclear     "/usr/lib64/python3.14/linecache.py
clearcacher      s    	KKMr   Nc                sr    \        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                s    \         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   updatecacheZMemoryErrorr   )r   r
   entry   && r   r   r       sV     IIh%ESZ1_Qx844 	s   
A   AAc                 sr    \        V 4      p^Tu;8:  d   \        V4      8:  d   M R# W!^,
          ,          # R# )i   r   )_getlines_from_coder   )r   r	   r   r   r   _getline_from_coder   /   s2    )EF c%j  aZ  r   c                 sH    V P                   V P                  V P                  3# N)Zco_filenameZco_qualnameZco_firstlineno)code   &r   	_make_keyr   5   s!    d..0C0CDDr   c                 s    \        V 4      p\        P                  VR 4      pVe   \        V4      ^8w  d
   V^,          # . # r   )r   _interactive_cacher   r   )r   Zcode_idr   s   &  r   r   r   8   s;    oG""7D1ESZ1_QxIr   c                s    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   r   r   _source_unavailabler   @   sY      	5 	5$ 4 4!!#&4 4''
33	r   c                s   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    ZcopyZkeysr   r   osImportErrorstatOSError
ValueErrorpopst_sizest_mtime)	r   Z	filenamesr   sizemtimer   fullnamer   r    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                s    ^ 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   Z__file__
i)r   systokenizer   r    r#   r   r   r   r    r!   r   _make_lazycache_entry
splitlinesZpathZisabsZjoinZ	TypeErrorZAttributeErrorr"   ZopenZ	readlinesZUnicodeDecodeErrorZSyntaxErrorr   r$   r%   )r   r
   r   r+   r,   r   r(   r    Zbasename
lazy_entryZdatalineZdirnameZfpr   r&   r'   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                s    \         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   r-   )r   r
   r   r/   s   &&  r   	lazycacher1      sG     IIh%E5zQ&x@J$hr   c                 s  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   NZ__name__Z__spec__nameloaderZ
__loader__
get_sourcec                 s   < S! V .VO5/ VB # r   r   )r2   ZargsZkwargsr4   s   &*,r   	get_linesZ(_make_lazycache_entry.<locals>.get_lines   s    !$8888r   )r   r   r   Zgetattr)r   r
   Zspecr2   r3   r5   r4   s   &&    @r   r-   r-      s    ++C00X5F5Fs5K5K*6!!*-tVT*HHnZ.Hx.>#''5FV\48
J# 9<r   c                 sZ   \        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   r.   r#   Z	co_constsZ
isinstanceZtypeZappendr   r   )r   Zstringr2   r0   r   ZstackZconstZkeys   &&&     r   _register_coder6      s    [&,&7&7&9:&9dTkk&9:E FE
yy{^^E%d,,U# $ o"'3  ;s   B()r   r   r)   r1   r   )Z__doc__Z__all__r    r   r   r   r   r   r   r   r   r)   r   r1   r-   r6   r   r   r   <module>r7      s^    ?
 	 
E&@[|0((r   