+
    i  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
HtHtHt ^RIHtHt ]]P"                  ]3,          t]tR t]RR R ll4       tR R lt]P0                  R	 R
 l4       t]P4                  R R l4       t]P4                  R R l4       tR tR R lt]P<                  RR] P>                  /R ll4       t R t!R R lt"]P0                  R 4       t#]#P5                  ]PH                  4      ]P<                  R 4       4       t]P<                  R R l4       t%]P<                  R 4       t&R t'R# )    N)UnionOptionalcast)ResourceReaderTraversablec                sf   a a \        4       o\        P                  ! S 4      SS3V V3R ll4       pV# )a  
Replace 'package' parameter as 'anchor' and warn about the change.

Other errors should fall through.

>>> files('a', 'b')
Traceback (most recent call last):
TypeError: files() takes from 0 to 1 positional arguments but 2 were given

Remove this compatibility in Python 3.14.
c                 s   < VSJd4   V SJd	   S! W4      # \         P                  ! R \        ^R7       S! V4      # V SJ d   S! 4       # S! V 4      # )z/First parameter to files is renamed to 'anchor')Z
stacklevel)warningsZwarnZDeprecationWarning)anchorpackagefunc	undefineds   &&4/usr/lib64/python3.14/importlib/resources/_common.pywrapperZ"package_to_anchor.<locals>.wrapper!   sX    )#Y&F,,MMA"
 = y 6MF|    )Zobject	functoolsZwraps)r	   r   r
   s   f @r   package_to_anchorr      s3     I__T )   Nr   c                sF    V ^8  d   QhR\         \        ,          R\        /# )   r   return)r   Anchorr   Zformat   "r   __annotate__r   4   s     ) )(6" )k )r   c                s*    \        \        V 4      4      # )z+
Get a Traversable resource for an anchor.
)from_packageresolve)r      &r   filesr   3   s    
 ((r   c                sZ    V ^8  d   QhR\         P                  R\        \        ,          /# )r   r   r   )types
ModuleTyper   r   r   r   r   r   r   ;   s%      !1!1 h~6N r   c                sx    V P                   p\        VP                  RR4      pVf   R# V! VP                  4      # )z7
Return the package's loader if it's a ResourceReader.
get_resource_readerN)Z__spec__Zgetattrloadername)r   specreaders   &  r   r   r   ;   s9     DT[["7>F~$))r   c                sZ    V ^8  d   QhR\         \        ,          R\        P                  /# r   candr   )r   r   r   r   r   r   r   r   r   L   s%     ( ((6" (u'7'7 (r   c                 s6    \        \        P                  V 4      # N)r   r   r   r"   r   r   r   r   K   s      $''r   c                sD    V ^8  d   QhR\         R\        P                  /# r!   )strr   r   r   r   r   r   r   Q   s      ) )C )E$$ )r   c                 s.    \         P                  ! V 4      # r#   )	importlibZimport_moduler$   r   r   _r'   P   s    ""4((r   c                s<    V ^8  d   QhRRR\         P                  /# )r   r"   Nr   r   r   r   r   r   r   r   V   s      : :D :U%% :r   c                 sJ    \        \        4       P                  R ,          4      # )Z__name__)r   _infer_callerZ	f_globalsr$   r   r   r'   r'   U   s    =?,,Z899r   c                 s   a V3R lp R p\         P                  ! 4       o\        P                  ! V S4      p\        P                  ! W4      p\	        V4      P
                  # )zK
Walk the stack and find the frame of the first caller not in this module.
c                 sD   < V P                   S^ ,          P                   8H  # )r    )Zfilename)
frame_infostacks   &r   is_this_fileZ#_infer_caller.<locals>.is_this_file_   s    ""eAh&7&777r   c                 s     V P                   R 8H  # )r   )Zfunction)r*   r   r   
is_wrapperZ!_infer_caller.<locals>.is_wrapperb   s    ""i//r   )inspectr+   	itertoolsZfilterfalseZnextZframe)r,   r-   Znot_this_fileZcallersr+   s       @r   r)   r)   Z   sL    
80 MMOE)),>M##J>G=r   c                8    V ^8  d   QhR\         P                  /# )r   r   r(   r   r   r   r   r   l   s     
 
%** 
r   c                s    ^RI Hp V! V 4      pVP                  P                  VP                  4      pVP                  4       # )z5
Return a Traversable object for the given package.

)	wrap_spec)Z	_adaptersr1   r   r   r   r   )r   r1   r   r    s   &   r   r   r   l   s5     %WD[[,,TYY7F<<>r   
_os_removec             #   s  "   \         P                  ! VR 7      w  r4  \        P                  ! W0! 4       4       \        P                  ! V4       ? \
        P                  ! V4      x   V! V4       R#   \        P                  ! T4       i ; i  \         d     R# i ; i   T! T4       i   \         d     i i ; i; i5i)suffixN)tempfileZmkstemposZwriteZclosepathlibPathFileNotFoundError)r    r4   r2   ZfdZraw_paths   &&$  r   	_tempfiler:   y   s      ##62LB	HHR"HHRLll8$$	x  HHRL ! 			x   		so   B?A3 /B  )B 1B?3BB  BB?BB? B<"B+*B<+B96B<8B99B<<B?c                 sD    \        V P                  V P                  R 7      # )r3   )r:   
read_bytesr   pathr   r   
_temp_filer>      s    T__TYY77r   c                s0    V ^8  d   QhR\         R\        /# )r   r=   r   )r   Zboolr   r   r   r   r      s     
 
+ 
$ 
r   c                s    \         P                  ! \        4      ;_uu_ 4        V P                  4       uuRRR4       #   + '       g   i     R# ; i)z
Some Traversables implement ``is_dir()`` to raise an
exception (i.e. ``FileNotFoundError``) when the
directory doesn't exist. This function wraps that call
to always return a boolean and only return True
if there's a dir and it exists.
NF)
contextlibZsuppressr9   is_dirr<   r   r   _is_present_dirrA      s1     
		.	/	/{{} 
0	/	/	/s	   >A	c                sP    \        V 4      '       d   \        V 4      # \        V 4      # )zi
Given a Traversable object, return that object as a
path on the local file system in a context manager.
)rA   	_temp_dirr>   r<   r   r   as_filerC      s"     .d339T?ID9IIr   c              #  s   "   V x  R# 5i)z/
Degenerate behavior for pathlib.Path objects.
N r<   r   r   r'   r'      s      Js   	c                r0   )r   dir)r5   TemporaryDirectoryr   r   r   r   r      s     # #H// #r   c              #  s   "   V ;_uu_ 4       p\         P                  ! V4      x  RRR4       R#   + '       g   i     R# ; i5i)z>
Wrap tempfile.TemporaryDirectory to return a pathlib object.
N)r7   r8   )rE   Zresult   & r   
_temp_pathrH      s(     
 
ll6"" 
s   A0
AA		Ac              #  s   "   \        \        P                  ! 4       4      ;_uu_ 4       p\        W4      x  RRR4       R#   + '       g   i     R# ; i5i)zh
Given a traversable dir, recursively replicate the whole tree
to the file system in a context manager.
N)rH   r5   rF   _write_contents)r=   Ztemp_dirrG   r   rB   rB      s6      
H//1	2	2hh-- 
3	2	2	2s   'AA
AA		Ac                 s   V P                  VP                  4      pVP                  4       '       d5   VP                  4        VP	                  4        F  p\        W#4       K  	  V# VP                  VP                  4       4       V# r#   )Zjoinpathr   r@   ZmkdirZiterdirrI   Zwrite_bytesr;   )ZtargetZsourceZchildZitems   &&  r   rI   rI      sf    OOFKK(E}}NN$DE( % L 	&++-.Lr   r#   )Z )(r6   r7   r5   r   r?   r   r&   r.   r   r/   Ztypingr   r   r   Zabcr   r   r   r%   ZPackager   r   r   r   Zsingledispatchr   Zregisterr'   r)   r   ZcontextmanagerZremover:   r>   rA   rC   r8   rH   rB   rI   rD   r   r   <module>rJ      su   	          ( ( ,
  #%
&	@ ) )  ( ( 	) ) 	: :$
  yy 48
 J J 	',,    # # . .r   