+
    {:j                    |   ^ RI H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 ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIt^ RIt^ R	I H!t! ^ R
I"H#t# ^ RI$H%t%H&t& ^ RI'H(t( ^RI)H*t* ^RI*H+t+H,t,H-t- ^RI)H.t.H/t/ ^RI0H1t1H2t2 ]'       d\   ^ RIH3t3H4t4H5t5 ^RI6H7t7H8t8 ]5! RR]9R]9R]9/4      t:]5! RR]9];]9];]33,          3,          R]9];]9];]33,          3,          R]4]:,          /4      t<]Pz                  ! ]>4      t?^t@R3tAR tB ! R R]4      tC^ tDRtERtFRtG. tH/ tI]P                  ! 4       ;'       g    ^tK]	P                  R8X  d
   ]M! ^0]K4      tKR4tNR tOR! tPRR"RR]KR"R"RR#RR"R#R"R"R"R"3R$ R% lltQR& tR^tS^tT^tU^tV^tWR'tXR(tYR)tZR*t[R+t\R5t]R6R, lt^R- t_R. t`R/ taR0 tb ! R1 R24      tcR# )7    )annotationsN)ExecutorProcessPoolExecutorThreadPoolExecutor)datetimetimezone)basenamegetmtimegetsizeisfilejoin)Path)TYPE_CHECKINGIterable)uuid4)VersionOrder)package_streaming)EnvironmentPackageLoader)BaseCondaIndexCache)utils)CONDA_PACKAGE_EXTENSION_V1CONDA_PACKAGE_EXTENSION_V2CONDA_PACKAGE_EXTENSIONS)rsssqlitecache)FileInfo	MinimalFS)AnyNotRequired	TypedDict)IndexedPackagesIndexedShard	V3Sectiontar.bz2condawhl	ShardDictpackagespackages.condav3c                 V    ^ RI p V P                  P                  P                  4        R# )zBCalled by package extraction subprocesses to re-configure logging.N)conda_index.index.logutilindexlogutil	configure)conda_indexs    :lib/python3.14/site-packages/conda_index/index/__init__.pylogging_configr3   F   s    $'')    c                  "    ] tR t^NtR tR tRtR# )DummyExecutorc              '  	F   "   V F  pV F  pV! V4      x  K  	  K  	  R # 5iN )selffunc	iterablesiterablethings   &&*  r2   mapDummyExecutor.mapO   s#     !H!5k! " "s   !c                	4   aaa  ! VVV3R  lR4      pV! 4       # )c                  (   < ] tR t^UtV VV3R ltRtR# )$DummyExecutor.submit.<locals>.futurec                	   < S! S/ SB # r8   r9   )r:   argsr;   kwargss   &r2   result+DummyExecutor.submit.<locals>.future.resultV   s    T,V,,r4   r9   N)__name__
__module____qualname____firstlineno__rG   __static_attributes__)rE   r;   rF   s   r2   futurerC   U   s    - -r4   rN   r9   )r:   r;   rE   rF   rN   s   &fjl r2   submitDummyExecutor.submitT   s    	- 	- xr4   r9   N)rI   rJ   rK   rL   r?   rO   rM   r9   r4   r2   r6   r6   N   s    "
r4   r6    win32z.lockc                    VR 0 F_  p\         P                  P                  W4      p\         P                  P                  V4      '       d   KI  \         P                  ! V4       Ka  	  R# )noarchN)ospathr   isdirmakedirs)local_foldersubdirfolderrV   s   &&  r2   _ensure_valid_channelr\   n   sB    8$ww||L1ww}}T""KK %r4   FTc                   V ^8  d   QhRR/# )   threads
int | Noner9   )formats   "r2   __annotate__rb   u   s     @' @' @'r4   c                <   \         P                  P                  V 4      w  ppV\        P                  9   d)   V	'       d   \
        P                  R4       \        R4      h\        V VVVVVVVVVVVR7      pVP                  VVVV
R7       VP                  4        R# )a  
High-level interface to ``ChannelIndex``. Index all subdirs under
``dir_path``. Output to `output_dir`, or under the input directory if
`output_dir` is not given. Writes updated ``channeldata.json``.

The input ``dir_path`` should at least contain a directory named ``noarch``.
The path tree therein is treated as a full channel, with a level of subdirs,
each subdir having an update to repodata.json. The full channel will also
have a channeldata.json file.
zThe update_index function has changed to index all subdirs at once.  You're pointing it at a single subdir.  Please update your code to point it at the channel root, rather than a subdir. Use -s=<subdir> to update a single subdir.zRDoes not accept a single subdir, or a path named like one of the standard subdirs.)
subdirsr_   deep_integrity_checkdebugoutput_root	write_bz2	write_zstwrite_run_exportshtml_dependenciesrepodata_v3)patch_generatorverboseprogresscurrent_index_versionsN)rU   rV   splitr   DEFAULT_SUBDIRSlogwarning
ValueErrorChannelIndexr.   update_channeldata)dir_path
output_dir	check_md5channel_namerm   r_   rn   ro   rd   warnrp   rf   rh   ri   rj   rk   rl   _dirnamechannel_indexs   &&&&&&&&&&&&&&&&&   r2   update_indexr   u   s    : x(JAw%'''KK=
 0
 	

 !&++M '5	   $$&r4   c                <    \        V 4      p V R 8  d
   V R,          p V # )   A   )int)	timestamps   &r2   _make_secondsr      s(    II<	
	 r4   zrepodata.jsonzrepodata_from_packages.jsonzrepodata_shards.msgpack.zstz)repodata_shards_from_packages.msgpack.zstzrun_exports.jsonc                   VP                  R . 4       \        P                  ! VP                  R/ 4      VP                  R/ 4      RRR7       VfM   VP                  R/ 4      P	                  4        UUu/ uF   w  rEVP                  \        \        4      VbK"  	  ppp\        P                  ! VP                  R/ 4      VRRR7       \        P                  ! VP                  R/ 4      VP                  R/ 4      RRR7       VP                  RR4       F  pR F  pVR8X  d6   VP                  \        4      '       d   VP                  \        \        4      pVP                  V/ 4      pWh9   g   KY  RW,          R&   W,          R	,          P                  R
4       K  	  K  	  VP                  RR4       F  pR F  pVR8X  d6   VP                  \        4      '       d   VP                  \        \        4      pVP                  V/ 4      pVP                  VR4      p	V	'       g   Km  VR ,          P                  V4       K  	  K  	  VR ,          P                  4        V# u uppi )removedr)   F)mergeadd_missing_keysNr*   revokeTrevokeddependspackage_has_been_revokedremover9   )r)   r*   )
setdefaultr   merge_or_update_dictgetitemsreplacer   r   endswithappendpopsort)
rZ   repodatainstructionsnew_pkg_fixeskvfnkeyrecordspoppeds
   &&&&      r2   _apply_instructionsr      s   	2&	Z$R(	 
 %((R8>>@
@ II02LMqP@ 	 
 
%r*	 
%r*)2.	 x,1C&&2;;7Q+R+RZZ :<VWll3+G})-I&I&--.HI 2 - x,1C&&2;;7Q+R+RZZ :<VWll3+G[[T*Fv#**2. 2 - YOO
s   4&Ic                     R  p R pR p\        \        RR4      R7      p\        P                  VP                  R&   WP                  R&   WP                  R&   W#P                  R	&   R
Vn        R
Vn        V# )c                    \        V \        \        34      '       d7   V R 8  d
   V R,          p \        P                  ! V \
        P                  R7      p V P                  V4      # )r   r   tz)
isinstancer   floatr   fromtimestampr   utcstrftime)dt	dt_formats   &&r2   _filter_strftime1_get_jinja2_environment.<locals>._filter_strftime)  sI    b3,''L t''x||<B{{9%%r4   c           	         V'       dY   R V R2.pY2P                  4        UUu. uF  w  rEV RV R2NK  	  upp,          pRP                  RP                  V4      V 4      # V # u uppi )zhref=""z="z<a {}>{}</a> )r   ra   r   )textlinkrF   kwargs_listr   r   s   &&,   r2   _filter_add_href1_get_jinja2_environment.<locals>._filter_add_href0  sh    #D6+,K\\^D^TQqcA3aL^DDK!((+)>EEK Es   A#c                    R P                  V P                  R. 4      4      pV P                  R4       RV P                  R4       RV P                  R4       RV 2# )
r   namez vversionr   buildz

depends:
)r   r   )objdepends_strs   & r2   _filter_to_title1_get_jinja2_environment.<locals>._filter_to_title8  sa    ii	2 67 wwvr#'')"4!5Qswww7G6H m		
r4   r1   	templates)loaderhuman_bytesr   add_hrefto_titleT)r   r   r   r   filterstrim_blockslstrip_blocks)r   r   r   environments       r2   _get_jinja2_environmentr   (  s    &	
 ]K8K */):):K&&6
#&6
#&6
#"K $Kr4   c                    \        4       pVP                  R 4      pTP                  RP                  T ;'       g    RV4      V\        P
                  ! \        P                  4      VVR7      pV# )zsubdir-index.html.j2z{}/{}rQ   )titler)   current_timeextra_pathsrk   )r   get_templaterenderra   r   nowr   r   )r{   rZ   repodata_packagesr   rk   r   templaterendered_htmls   &&&&&   r2   _make_subdir_index_htmlr   P  sg     *+K''(>?HOOnn\//R8"\\(,,/+ $ M r4   c                    \        4       pVP                  R 4      pVP                  V VR,          VR,          \        P                  ! \
        P                  4      R7      pV# )zchanneldata-index.html.j2r)   rd   )r   r)   rd   r   )r   r   r   r   r   r   r   )r{   channeldatar   r   r   s   &&   r2   _make_channeldata_index_htmlr   _  sY    )+K''(CDHOOZ(I&\\(,,/	 $ M r4   c                    V '       g   V^8X  d   \        4       # \        V\        \        P                  ! R4      R7      # )   spawn)initializer
mp_context)r6   r   r3   multiprocessingget_context)rf   r_   s   &&r2   thread_executor_factoryr   k  s<     W\ 	 !&&227;
r4   c                     ] tR tRt$ RtRtR]R&   RtR]R&   R]RRR]	P                  RRRR	R	RR3RRRRR
RRR	RR	RRRRRRRR/	R R llltR tRCR ltR R ltR R ltR tRDR R lltRER ltRER lt]R R l4       tR  R! ltR" R# lt]R$ R% l4       tR& R' ltR( tRFR) ltR* tR+ tR, tR- tR. t R/ t!R0 t"R1 t#R2 t$RER3 lt%R4 t&RDR5 lt'R6 t(R7 t)R8 t*RDR9 R: llt+RDR; R< llt,RFR= R> llt-R? R@ lt.RA t/RBt0R# )Grv   iw  a  
Class implementing ``update_index``. Allows for more fine-grained control of
output.

See the implementation of ``conda_index.cli`` for usage.

:param channel_root: Path to channel, or just the channel cache if channel_url is provided.
:param channel_name: Name of channel; defaults to last path segment of channel_root.
:param subdirs: subdirs to index.
:param output_root: Path to write repodata.json etc; defaults to channel_root.
:param channel_url: fsspec URL where package files live. If provided, channel_root will only be used for cache and index output.
:param fs: ``MinimalFS`` instance to be used with channel_url. Wrap fsspec AbstractFileSystem with ``conda_index.index.fs.FsspecFS(fs)``.
:param base_url: Add ``base_url/<subdir>`` to repodata.json to be able to host packages separate from repodata.json
:param save_fs_state: Pass False to use cached filesystem state instead of ``os.listdir(subdir)``
:param write_monolithic: Pass True to write large 'repodata.json' with all packages.
:param write_shards: Pass True to write sharded repodata.msgpack and per-package fragments.
:param html_dependencies: Pass True to include dependency popups in generated HTML index files.
:param update_only: Pass True to only add or update, but not remove packages from the database.
NMinimalFS | Nonefs
str | Nonechannel_urlFTbase_urlsave_fs_statewrite_current_repodataupstream_stagecache_kwargsupdate_onlyrl   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# )r^   channel_rootz
Path | strr{   r   rd   zIterable[str] | Noner_   r`   cache_classztype[BaseCondaIndexCache]r   r   r   r   r   strr9   )ra   s   "r2   rb   ChannelIndex.__annotate__  sz     B@ B@ B@ !B@ &	B@
 B@ /B@$  %B@& 'B@( )B@. /B@r4   c       	        	   Vf   \         pV'       g	   V'       d   V'       d	   V'       g   \        R4      hVV n        VV n        \	        V4      V n        Wn        V'       d   \	        V4      MV P
                  V n        T;'       g$    \        \        V4      P                  R4      4      V n        W0n        \        P                  ! \        Wd4      V n        W`n        WPn        Wn        Wn        Wn        Wn        Wn        Wn        Wn        VV n        VV n        VV n        VV n        VV n        VV n        VV n        \@        PB                  ! \D        PF                  R7      pVPI                  R4      V n%        R # )Nz1Both or none of fs, channel_url must be provided./r   z%Y-%m-%dT%H:%M:%SZ)&MAX_THREADS_DEFAULT	TypeErrorr   r   r   r   r   rg   r	   r   rstripr{   _subdirs	functoolspartialr   rf   re   rh   ri   rj   write_monolithicwrite_shardsrk   compact_jsonr   r   r   r   r   rl   r   r   r   r   r   r   
created_at)r:   r   r{   rd   r_   re   rf   rg   r   rh   ri   rj   r   r   r   rk   r   r   r   r   r   r   r   r   rl   now_dts   &&&&&&&&&&&&&&&&$$$$$$$$$ r2   __init__ChannelIndex.__init__  s/   8 ?)G+{OPP& .&0;4,ARAR(SSHS5F5M5Mc5R,S'0'8'8#U(
$ 
$8!""!2 0(!2( *&<#,&&( . //*>?r4   c                	   V P                   ! RR V P                  RVRV P                  RV P                  RV P                  RV P
                  /V P                  ;'       g    / B pVP                  '       d   VP                  4        V# )r   rZ   r   r   r   r   r9   )	r   r   r   r   r   r   r   cache_is_brand_newconvert)r:   rZ   caches   && r2   cache_for_subdirChannelIndex.cache_for_subdir  s       
**

 ww
 ((	

  ..
 ((
 %%2
 ###MMOr4   c                j  a aaa S'       d   \         P                  R\        4       S P                  4       oVV VV3R lpS P	                  4       ;_uu_ 4       p. pV! 4        F  pS P
                  S P                  3S P                  S P                  33 FI  w  rV
'       g   K  VP                  VP                  \        P                  ! V	VSSVVR7      4      4       KK  	  K  	  V F+  pVP                  4       p\         P                  RV 24       K-  	  RRR4       R#   + '       g   i     R# ; i)zd
Examine all changed packages under ``self.channel_root``, updating
``index.html`` for each subdir.
zYChannelIndex.index(verbose=...) is a no-op. Alter log levels for %s to control verbosity.c                 l   < \        ^R7      p VVVV3R lpR V3R llpV P                  W!! 4       4      # )r   )max_workersc               3     <"   S F7  p \        SP                  V 4       \        SP                  V 4      pV SSV3x  K9  	  R # 5ir8   )r\   r   r   )rZ   subdir_pathro   r:   rd   rn   s     r2   extract_argsJChannelIndex.index.<locals>.extract_subdirs_to_cache.<locals>.extract_args  sA     %F)$*;*;VD"&t'8'8&"AK!7HkBB	 &s   A Ac                   V ^8  d   QhRR/# )r^   rE   tupler9   )ra   s   "r2   rb   JChannelIndex.index.<locals>.extract_subdirs_to_cache.<locals>.__annotate__  s     
 
e 
r4   c           	        < V w  rr4SP                  V4      ;_uu_ 4       pSP                  '       d   VP                  V4       SP                  WW4V4      uuR R R 4       #   + '       g   i     R # ; ir8   )r  r   extract_subdir_to_cache)rE   rZ   rn   ro   r
  r  r:   s   &     r2   extract_wrapperMChannelIndex.index.<locals>.extract_subdirs_to_cache.<locals>.extract_wrapper  s`    9=6**622e )))++K877 3222s   6A!!A2	)r   r?   )executorr  r  ro   r:   rd   rn   s      r2   extract_subdirs_to_cache4ChannelIndex.index.<locals>.extract_subdirs_to_cache  s8    )a8HC C
 
 <<@@r4   )rZ   rn   ro   rm   rp   z
Completed N)rs   rf   rI   detect_subdirsr   index_patch_subdirr   index_patch_subdir_shardsr   r   rO   r   r   rG   info)r:   rm   rn   ro   rp   r  index_processfuturesrZ   indexer	conditionrN   rG   rd   s   f&ff&        @r2   r.   ChannelIndex.index  s    IIk
 %%'
	A 	A: ))++}G24,,d.C.CD33T5F5FG+&G !y)00 ) 1 1$++1,3-54C;Q!"	+ 5& ":fX./ "+ ,+++s   AD!$A3D!!D2	c               $    V ^8  d   QhRRRRRR/# r^   rZ   r   rn   boolro   r9   )ra   s   "r2   rb   r   /  s(     

 



 

 	

r4   c                	(    V P                  WW4V4      # r8   )r  )r:   rZ   rn   ro   rm   rp   s   &&&&&&r2   index_prepared_subdir"ChannelIndex.index_prepared_subdir/  s     &&X8N
 	
r4   c               $    V ^8  d   QhRRRRRR/# r!  r9   )ra   s   "r2   rb   r   ;  s-     C CC C 	Cr4   c                d   \         P                  RV4       V P                  WVR7      p\         P                  RV4       V P                  VV\        4       \         P                  RV4       V P                  WV4      w  rx\         P                  RV4       V P                  W\        4       V P                  '       d<   \         P                  RV4       V P                  VV P                  WV4      RR7       MV P                  VR4       V P                  '       dV   \         P                  R	V4       V P                  V4      p	\         P                  R
V4       V P                  VV	\        R7       \         P                  RV4       V P                  W4       \         P                  RV4       V# )zI
Create repodata_from_packages.json by calling index_subdir, then patch.
Subdir: %s Gathering repodatarn   ro   z%s Writing pre-patch repodata%s Applying patch instructions%s Writing patched repodataz#%s Building current_repodata subsetzcurrent_repodata.json)json_filenamez%s Building run_exports dataz%s Writing run_exports.jsonz%s Writing index HTML	%s finish)rs   r  index_subdir_write_repodataREPODATA_FROM_PKGS_JSON_FN_patch_repodataREPODATA_JSON_FNr   _build_current_repodata_remove_repodatarj   build_run_exports_dataRUN_EXPORTS_JSON_FN_write_subdir_index_htmlrf   )
r:   rZ   rn   ro   rm   rp   repodata_from_packagespatched_repodatar}   run_exports_datas
   &&&&&&    r2   r  ChannelIndex.index_patch_subdir;  s    	0&9!%!2!2h "3 "
 	0&9"&	
 	16:"22O
 	.7V7GH&&&HH:FC  ,,.D 6 !  !!&*AB!!!HH3V<#::6BHH2F;   1 !  	(&1%%f?		+v&r4   c                &    ^RI Hp V! WVR7      pV# )zH
Isolate call to build_current_repodata(), skipping import if not used.
)build_current_repodata)pins)current_repodatar=  )r:   rZ   r9  rp   r=  r?  s   &&&&  r2   r3  $ChannelIndex._build_current_repodata  s      	=1+A
  r4   c               $    V ^8  d   QhRRRRRR/# r!  r9   )ra   s   "r2   rb   r     s(     : :: : 	:r4   c                R   \         P                  RV4       \        P                  ! 4       pV P	                  WVR7      p\         P                  RV4       V P
                  V,          \        ,          pV P                  VVP                  \        P                  ! V4      4      4       \         P                  RV4       V P                  WV4      w  r\         P                  RV4       VP                  4       p/ VR&   V	P                  4        F  w  rVP                  \        P                  ! V4      4      p\        P                  ! V4      P!                  4       pWR,          V&   V P"                  V,          VP%                  4        R2,          pVP'                  4       '       d   K  VP)                  V4       K  	  V P
                  V,          \*        ,          pV P                  VVP                  \        P                  ! V4      4      4       \         P-                  RV4       V# )	z,
Create repodata_from_packages, then patch.
r(  r)  z%s Writing pre-patch shardsr*  r+  shards.msgpack.zstr-  )rs   r  	zstandardZstdCompressorindex_subdir_shardsr   REPODATA_SHARDS_FROM_PKGS_FN_maybe_writecompressr   packb_typed_patch_repodata_shardscopyr   hashlibsha256digestrg   hexexistswrite_bytesREPODATA_SHARDS_FNrf   )r:   rZ   rn   ro   rm   rp   
compressorshards_from_packagespatched_pathpatched_packagesr}   repodata_shardspkgrecord
shard_data
shard_hashoutput_paths   &&&&&&           r2   r  &ChannelIndex.index_patch_subdir_shards  s    	0&9--/
#77h  8  
 	.7((614PP 7 78L MN	
 	16:"99/
 	.7.335$&!+113KC#,,[-D-DV-LMJ 
3::<J-7H%c***V39I8J,6WWK%%''''
3 4 ((614FF 7 7 HI	

 			+v&r4   c                   V P                  V4      ;_uu_ 4       p\        P                  RV P                  V4       / pV P                  pR\
        RRRRRRVRV/R	V/pV P                  '       d,   V P                  P                  R
4       R
V R
2VR,          R&   \        P                  ! 4       pV P                  V,          P                  RRR7       R/ R/ R/ /p	VP                  4        EF
  p
V P                  V
4      pVP                  \        P                   ! V4      4      p\"        P$                  ! V4      P'                  4       pV P                  V,          VP)                  4        R2,          pVP+                  4       '       g   VP-                  V4       WV
P.                  &   V P0                  '       g   K  VR,          P3                  4        F  w  ppW,          P5                  V4       K  	  EK  	  V P0                  '       d   V P7                  V	4      .VR,          R&   VuuRRR4       #   + '       g   i     R# ; i)zm
Generate sharded repodata from the cache.

Must call `extract_subdir_to_cache()` first or will be outdated.
Building repodata for %s/%sr   r  r   rQ   shards_base_urlr   rZ   rC  r   T)parentsexist_okr%   r&   r'   rD  r+   repodata_revisionsN)r  rs   rf   r{   r   REPODATA_SHARDS_VERSIONr   r   rE  rF  rg   mkdirindexed_shards_indexed_shard_to_repodatarJ  r   rK  rN  rO  rP  rQ  rR  rS  r   rl   r   update_make_repodata_revision_data)r:   rZ   rn   ro   r  rC  r   shards_indexrU  v3_datashardrepodata_shardshard_bytesr]  r^  sectionr   s   &&&&             r2   rG   ChannelIndex.index_subdir_shards  s    ""6**eII3T5F5FOFJ 2%r *f	 &	L }}} }}++C016(!< V$Z0 #113J&--dT-J 2rG --/!%!@!@!G(11++N; %^^K8??A
$$v-:>>3C2DL0QQ  #))++++K8%/uzz"###,:4,@,F,F,H((//8 -I 0" 55g>>V$%9:  u +***s   FH5>AH5H55I	c           
     <   V P                  V4      ;_uu_ 4       p\        P                  RV P                  V4       VP	                  4       pRRR4       RXP
                  RVP                  RRV/R\        R. /pV P                  '       d<   V P                  V4      pWvR	&   / VR&   / VR&   V P                  V4      .VR,          R
&   V P                  '       d1   V P                  P                  R4       RV R2VR,          R&   ^VR&   V#   + '       g   i     L; i)ze
Generate repodata from the cache.

Must call `extract_subdir_to_cache()` first or will be outdated.
ra  Nr)   r*   r  rZ   repodata_versionr   r+   re  r   r   )r  rs   rf   r{   indexed_packagesr)   packages_condaREPODATA_VERSIONrl   _extract_indexed_packages_v3rk  r   r   )r:   rZ   rn   ro   r  ru  new_repodatav3_packagess   &&&&    r2   r.  ChannelIndex.index_subdir
  s+    ""6**eII3T5F5FO$557 + (11.==&  0r
 ;;<LMK!,')L$-/L)*11+>:L !56 ===26--2F2Fs2K1LAfXUV/WL ,/0L+,; +*s   2DD	c                    V ^8  d   QhRRRR/# )r^   rV   r   returnr   r9   )ra   s   "r2   rb   r   1  s      s z r4   c                	h    R F+  pV P                  V4      '       g   K  V R\        V4      )  u # 	  R# ).tar.bz2N)r  .condaz.whl)r   len)rV   	extensions   & r2   _v3_key_for_pathChannelIndex._v3_key_for_path0  s4    7I}}Y''-s9~o.. 8 r4   c                    V ^8  d   QhRRRR/# )r^   ru  r"   r}  r$   r9   )ra   s   "r2   rb   r   7  s     ' ' /'	'r4   c                   R/ R/ R/ /pRVP                   3RVP                  3RVP                  33 F  w  r4VP                  4        F  w  rVV P	                  V4      pVf   \
        P                  RV4       K2  VR8X  de   VP                  RR4      pVP                  RR4      p	VP                  RR4      p
Ve	   V	e   V
f   \
        P                  R	V4       K  V R
V	 R
V
 2pWbV,          V&   K  	  K  	  V# )zF
Return all packages from IndexedPackages as the "v3": {...} section.
r%   r&   r'   Nz%s has unsupported extensionr   r   r   z=%s: v3 whl records require name, version, and build; skipping-)r)   rv  packages_whlr   r  rs   rt   r   )r:   ru  r+   rq  r   filenamer[  r   r   r   r   s   &&         r2   rx  )ChannelIndex._extract_indexed_packages_v37  s    rR2
 (112&556$112!
G
 %,MMO ++H5;KK >I
 e#!::fd3D$jjD9G"JJw5E|w%-[$ !!F!G9AeW5C#)7C + %4!
8 	r4   c                    V ^8  d   QhRRRR/# )r^   indexed_shardr#   r}  r(   r9   )ra   s   "r2   rb   r   `  s        r4   c                	    V P                   '       d   R / R/ RV P                  V4      /pV# R VP                  RVP                  /pV# )r)   r*   r+   )rl   rx  r)   rv  )r:   r  r\  s   && r2   ri  'ChannelIndex._indexed_shard_to_repodata`  s^    B "d77F%J  M22 -">">J r4   c                    V ^8  d   QhRRRR/# )r^   revision_datazdict[str, dict[str, dict]]r}  zdict[str, int | None]r9   )ra   s   "r2   rb   r   o  s     
 
1
	
r4   c           
        . p^ pV P                  4        Fu  pV\        V4      ,          pVP                  4        FL  pVP                  R4      p\        V\        \
        34      '       g   K2  VP                  \	        V4      4       KN  	  Kw  	  R\        RTRV'       d   \        V4      MRRV'       d   \        V4      /# R/# )z
Return { "revision": 3, ... } dict with package statistics derived from
revision_data, which is similar to monolithic repodata.
r   revision
n_packagesoldestNnewest)
valuesr  r   r   r   r   r   REPODATA_REVISION_V3minmax)r  
timestampsr  section_recordsr[  r   s   &     r2   rk  )ChannelIndex._make_repodata_revision_datan  s     

,335O#o..J)002"JJ{3	i#u66%%c)n5 3  6 ,*c*oc*o	
 	
 :>	
 	
r4   c               $    V ^8  d   QhRRRRRR/# )r^   rZ   r   r  zsqlitecache.CondaIndexCacher}  r9   )ra   s   "r2   rb   r     s-     C CC +C 
Cr4   c           
        \         P                  RV4       VP                  4        Uu. uF5  p\        VP	                  VR,          4      VR,          VR,          R7      NK7  	  pp\         P                  RV\        V4      4       \        P                  ! VP                  V P                  V4      p\        P                  ! 4       p	^ p
V P                  4       ;_uu_ 4       pVP                  W4       F_  w  rrW,          p
V'       g   K  V'       g   K"  V'       d   K,  \         P                  R\        P                  P!                  WL4      4       Ka  	  \        P                  ! 4       p V
VV	,
          ,          pRRR4       \         P%                  R	V\&        P(                  ! V
4      \        V4      \&        P(                  ! X4      4       V# u upi   \"         d    ^ p Lhi ; i  + '       g   i     Lt; i)
zM
Extract all changed packages into the subdir cache.

Return name of subdir.
z%s find packages to extractrV   mtimesize)r   st_mtimest_sizez%s extract %d packageszPackage at %s did not contain valid index.json data.  Please check the file and remove/redownload if necessary to obtain a valid package.Nz*%s cached %s from %s packages at %s/second)rs   rf   changed_packagesr   
plain_pathr  r   r   extract_to_cache_info_objectr   timer   r?   errorrU   rV   r   ZeroDivisionErrorr  r   r   )r:   rZ   rn   ro   r
  r  rowextractextract_func
start_timesize_processedthread_executorr   r  r  
index_jsonend_time	bytes_secs   &&&&&&            r2   r  $ChannelIndex.extract_subdir_to_cache  s    			/8 --/
 0 ##CK0WF
 0 	 
 			*FCLA !((..0A0A6
 YY[
))++/>/B/B0+4 &2%%!		/ GGLL9	0$ yy{H*h.CD	+ ,0 	8n-Li(	
 g
R % 	- ,+sB   ;G!%G(G(G(AG(,GG%"G($G%%G((G8	c                	Z    \         P                  P                  V P                  R 4      pV# )channeldata.json)rU   rV   r   rg   )r:   channeldata_files   & r2   channeldata_pathChannelIndex.channeldata_path  s$    77<<(8(8:LMr4   c                `   V P                  4       p/ pV P                  4       p\        P                  P	                  V4      '       d3   \        V4      ;_uu_ 4       p\        P                  ! V4      pRRR4       V F  p\        P                  RV4       \        P                  RV4       \        \        P                  P                  V P                  V\        4      4      ;_uu_ 4       p\        P                  ! V4      pRRR4       V P                  VXV4       \        P                  RV4       K  	  V'       d   V P                  V4       V P!                  V4       \        P                  R4       V P#                  V4       R#   + '       g   i     EL ; i  + '       g   i     L; i)z
Update channeldata based on re-reading output `repodata.json` and existing
`channeldata.json`. Call after index() if channeldata is needed.
NzChanneldata subdir: %sz%s read repodataz%s channeldata finishedzwrite channeldata)r  r  rU   rV   r   openjsonloadrs   r  rf   r   rg   r2  _update_channeldata
_write_rss_write_channeldata_index_html_write_channeldata)	r:   r   rd   channel_datar  frZ   r   r9  s	   &&       r2   rw   ChannelIndex.update_channeldata  s<   
 %%'
 00277>>*++&''1#yy| ( FHH-v6II(&1T--v7GH #'99X#6 
 $$\3CVLII/8  OOL) 	**<8		%&-- ('' s   F	+F	F	F-c                	H   V P                   '       g   \        P                  ! V P                  4       Uu0 uFH  pVP                  \
        P                  9   g   K$  VP                  4       '       g   K<  VP                  kKJ  	  pp\        P                  R V4       \        VR0,          4      V n        V P                  # \        \        V P                   4      4      V n        RV P                  9  d!   \        P                  RV P                  4       V P                  # u upi )zfound subdirs %srT   z%Indexing %s does not include 'noarch')r   rU   scandirr   r   r   rr   is_dirrs   rf   sortedrd   setrt   )r:   rZ   detected_subdirss   &  r2   r  ChannelIndex.detect_subdirs  s    }}} !jj):):; ;F;;%"7"77 <BMMO ;   
 II(*:;!"2hZ"?@DL
 || "#dmm"45DLt||+CT\\R|| s   !DD3Dc                   \        V P                  W4      pV P                  V4      pV P                  WERR7      pVR,           pVR,           pV'       g&   \        P
                  P                  V4      '       g   V P                  '       d8   \        P                  ! VP                  R4      4      p	V P                  Wy4       MV P                  V4       V P                  '       dR   \        P                  ! \        \         R7      P                  VP                  R4      4      p
V P                  W4       V# V P                  V4       V# )z8
Write repodata to :json_filename, but only if changed.
F)write_newline_end.bz2.zstutf-8)levelr_   )r   r   
json_dumpsrI  rU   rV   rR  rh   bz2rJ  encode_maybe_removeri   rE  rF  ZSTD_COMPRESS_LEVELZSTD_COMPRESS_THREADS)r:   rZ   r   r,  repodata_json_pathry  write_resultrepodata_bz2_pathrepodata_zst_pathbz2_contentrepodata_zst_contents   &&&&       r2   r/  ChannelIndex._write_repodata  s    "$"3"3VKx0(( ) 

 /7.7rww~~.?@@~~~!ll<+>+>w+GH!!"3A""#45~~~'0'?'?-7L((<..w78 % !!"3J  ""#45r4   c                    \        V P                  W4      pVR,           pVR,           pV P                  V4       V P                  V4       V P                  V4       R# )zH
Remove json_filename and variants, to avoid keeping outdated repodata.
r  r  N)r   r   r  )r:   rZ   r,  r  r  r  s   &&&   r2   r4  ChannelIndex._remove_repodata#  sZ     "$"3"3VK.7.7-.,-,-r4   c                	  a  VR ,          pVR,          p/ pVP                  V4       VP                  V4       \        S P                  V4      pV 3R lp/ pV! V\        V\        4      4       S P                  '       d   V! V\        V\        R,           4      4       V! V\        V\
        4      4       S P                  '       d   V! V\        V\
        R,           4      4       V! V\        VR4      4       \        S P                  VVVS P                  4      p	V	'       g   Q h\        VR4      p
S P                  W4      # )r)   r*   c                   < \        \        SP                  V4      4      '       dM   \        P                  ! VR4      w  r#R\        V4      R\        \        V4      4      RVR V/V \        V4      &   R# R# )md5rO  r  r   N)r  rO  )	r   r   r   r   	checksumsr   r   r
   r	   )r   rV   md5sum	sha256sumr:   s   &&  r2   _add_extra_path>ChannelIndex._write_subdir_index_html.<locals>._add_extra_path8  se    d4,,d344$)OOD:K$L!GDMXd^!4i6	/HTN+ 5r4   r  patch_instructions.json
index.html)
rj  r   r   r2  rh   r0  r   r{   rk   rI  )r:   rZ   r   repodata_legacy_packagesrepodata_conda_packagesr   r
  r  r   r   
index_paths   f&&        r2   r7  %ChannelIndex._write_subdir_index_html.  s#   #+J#7 "*+;"<  !9:  !894,,f5	 T+7G%HI>>>Kk;Kf;T)UVT+7Q%RS>>>T+/IF/RS 	T+7P%QR/""
 }+|4
  ;;r4   c                	    \         P                  R 4       \        P                  ! V P                  V4      p\        V P                  R4      pV P                  W24       \         P                  R4       R# )z	Build RSSzrss.xmlz	Built RSSN)rs   r  r   get_rssr{   r   r   rI  )r:   r   rss_textrss_paths   &&  r2   r  ChannelIndex._write_rssX  sP    ;;t00+>))95(-r4   c                	    \        V P                  V4      pV'       g   Q h\        V P                  R 4      pV P	                  W24       R# )r  N)r   r{   r   r   rI  )r:   r   r   r  s   &&  r2   r  *ChannelIndex._write_channeldata_index_html_  s<    4T5F5FT}$++\:
*4r4   c                	   VR ,          pVR,          p\        VP                  4       4      VP                  4        Uu0 uF  qfRR \        ,           kK  	  up,
          pVP                  4       pTP	                  V Uu/ uF  qfWF,          bK  	  up4       VP                  R / 4      p	R p
V
! V4      pR p. . rV'       d   \        V!  w  rV P                  V4      ;_uu_ 4       pVP                  pV P                  4       ;_uu_ 4       p\        VVP                  VV4      4       EF  w  ppV'       g   K  VP	                  V4       VR,          pV	P                  V/ 4      pVP                  RR4      pVP                  RR4      p\        V4      \        V4      8  ;'       gE    VV8H  ;'       d8    \        VP                  R^ 4      4      \        VP                  R^ 4      4      8  pV	P                  V/ 4      V	V&   R F  pV! V	V,          VVVV4       K  	  R F8  p\        VP                  V4      VP                  V4      34      V	V,          V&   K:  	  \        \        \        VP                  R	. 4      V.,           4      4      4      V	V,          R	&   VP                  R
/ 4      pVP                  R
4      pV'       d   VP                  R
4      VV&   VV	V,          R
&   \        \!        VP                  R^ 4      VP                  V/ 4      P                  R^ 4      4      4      V	V,          R&   EK  	  RRR4       RRR4       VP	                  R\"        R	\        \        \        VP                  R	. 4      V.,           4      4      4      R V	/4       R# u upi u upi   + '       g   i     Lr; i  + '       g   i     L}; i)r)   r*   Nc                .   / pV P                  4        Fg  w  r#VR ,          VR,          3pVP                  R^ 4      pVP                  V4      pV'       d!   V^,          P                  R^ 4      V8  g   Kb  W#3W&   Ki  	  \        VP                  4       4      # )r   r   r   )r   r   listr  )all_repodata_packagesnameverr   packager   r   existings   &      r2   newest_by_name_and_versionDChannelIndex._update_channeldata.<locals>.newest_by_name_and_version}  s    G4::<v	(:;#KKQ7	";;s+8A;??;#BY#N$&=GL  = ())r4   c                    VP                  V4      '       d,   V'       g   VP                  V4      '       g   W,          W&   R # VP                  V4      W&   R # r8   )r   )pddataexisting_record
data_newerr   s   &&&&&r2   _replace_if_newer_and_presentGChannelIndex._update_channeldata.<locals>._replace_if_newer_and_present  s<    xx{{
/2E2Ea2H2H'++A.r4   r   r   0r   rd   run_exportschanneldata_versioni)descriptiondev_urldoc_urldoc_source_urlhomelicense
source_urlsource_git_urlsummaryicon_url	icon_hashtagsidentifierskeywordsrecipe_originr   )binary_prefixtext_prefix
activate.ddeactivate.dpre_link	post_link
pre_unlink)r  keysr   rM  rj  r   zipr  load_all_from_cacher   r?   r   r   anyr  r  r  CHANNELDATA_VERSION)r:   r  r   rZ   legacy_packagesconda_packagesr   use_these_legacy_keysr  package_datar  groupsr  fnsfn_dictsr  	load_funcr  fn_dictr  r   r   data_verec_vr  r  exports_from_this_versions   &&&&                       r2   r   ChannelIndex._update_channeldatae  s   ":.!"23 #O$8$8$: ;9G9L9L9N?
9NAcrF///9N?
 !
 !/ 3 3 5$$,AB,Aq"",AB	
 $''
B7
	* ,,AB	/ BXLMC""6**e11I--//?%(?3F3FyRU3V%WMGTtG,#F|*6*:*:4*D!%)S!9!0!4!4Y!D%1&%9L<P%P & &"f, Q Q -dhh{A.F G+O,?,?Q,OP!Q # .:-=-=dB-GT*"A$ : ,T 2 $ / * !%"6"A 58!%!o.A.A!.D E5L.q1" 9? _%8%8B%G6(%R!ST9T*95 '6&9&9-&L48HH]4K1426((=2IK/<GT*=9:G $a 8 , 0 0r : > >{A N;T*;7G &X 0 +Z 	%':6\--i<xGHI L	
u?

 CT 0/ +*sC   N=N$%N4	)N!	7A-N!	%N!	2FN!	7N4!N1,N44O	c                    V P                   '       d   \        P                  ! VRRR7      # \        P                  ! VR^R7      R,           # )z$
Format json based on class policy.
T)	sort_keys
separators)r0  indentr   ),:)r   r  dumps)r:   r  s   &&r2   r  ChannelIndex.json_dumps  s;     ::ddzJJ::dd1=DDr4   c                	P   VP                  R / 4      P                  4        FB  w  r#VP                  4        UUu/ uF  w  rEVf   K  VR8w  g   K  WEbK  	  uppVR ,          V&   KD  	  \        V P                  R4      pV P	                  V4      pV P                  WgR4       R# u uppi )r)   Ncommitsr  T)r   r   r   r   r  rI  )r:   r   rZ  pkg_dictr   r   r  contents   &&      r2   r  ChannelIndex._write_channeldata  s    (__Z<BBDMC!)!1,!1QqI~!1,K
#C( E   1 13EF//+.*T:,s   B"B"B"c           	        \        V P                  V4      p\        P                  RV4       / p/ pV P	                  V4      ;_uu_ 4       pVP                  4        Fm  pVw  rRT
;'       g    / /p
V	P                  \        4      '       d   WV	&   K6  V	P                  \        4      '       d   WV	&   KW  \        P                  RV	4       Ko  	  RRR4       RVRVRRVR	\        //pV#   + '       g   i     L"; i)
z
Return CEP-12 compliant run_exports metadata from the db cache.

Must call `extract_subdir_to_cache()` first or will be outdated.
zBuilding run_exports for %sr  z$%s doesn't look like a conda packageNr)   r*   r  rZ   r   )r   r   rs   rf   r  r  r   r   r   rt   RUN_EXPORTS_VERSION)r:   rZ   rn   ro   r
  run_exports_packagesrun_exports_conda_packagesr  r  rV   r:  new_run_exports_datas   &&&&        r2   r5  #ChannelIndex.build_run_exports_data   s     4,,f5		/=!%'"""6**e((*),&$13C3I3Ir#J ==!;<<1A.]]#=>>7Gt4KK FM + + ,8&. 
 $#) +*s   
!C&,C& C&, C&&C6	c                	   / pR P                  VR34      p\        P                  ! VRR7       FN  w  rVVP                  V8X  g   K  VP	                  V4      pV'       g   Q R4       h\
        P                  ! V4      pKP  	  V# )r   r  rZ  )	componentz!tar member was not a regular file)r   r   stream_conda_componentr   extractfiler  r  )r:   rZ   rm   r   targettarmemberreaders   &&&     r2    _load_patch_instructions_tarball-ChannelIndex._load_patch_instructions_tarball#  sw    6#<=>,CCu
KC {{f$0BBBv#yy0
 r4   c                	   T;'       g    \        V P                  R 4      p\        V4      '       d   \        P	                  RV RV 24       ^ RIHpHp V! RV4      pV'       d7   VP                  '       d%   V! V4      pVP                  P                  V4       M
\        4       hVP                  W!4      p	V	P                  R^ 4      ^8  d   \        R4      hV	# V'       d   \        RV R24      h/ # )	zgen_patch.pyzusing patch generator z for )module_from_specspec_from_file_locationa_bpatch_instructions_version'Incompatible patch instructions versionzSpecified metadata patch file 'zp' does not exist. Please try an absolute path, or examine your relative path carefully with respect to your cwd.)r   r   r   rs   rf   importlib.utilrM  rN  r   exec_moduleImportErrorr1  r   RuntimeErrorru   )
r:   rZ   r   rm   gen_patch_pathrM  rN  specmodr   s
   &&&&      r2   _create_patch_instructions'ChannelIndex._create_patch_instructions0  s    (SSD1B1BN,S.!!II.~.>eF8LM Q*5.AD&t,'',!m#..x@L <a@1D"#LMM 5o5F G0 0 
 Ir4   c                	z    V P                  V4      p\        V P                  VR 4      pV P                  WCR4       R# )r  TN)r  r   r   rI  )r:   rZ   r   	new_patchpatch_instructions_paths   &&&  r2   _write_patch_instructions&ChannelIndex._write_patch_instructionsN  s<    OOL1	"&v'@#
 	1dCr4   c                	Z   \        V P                  VR 4      p\        V4      '       do   \        P	                  RV4       \        V4      ;_uu_ 4       p\        P                  ! V4      pVP                  R^ 4      ^8  d   \        R4      hVuuRRR4       # / #   + '       g   i     / # ; i)r  zusing patch instructions %srP  rQ  N)
r   r   r   rs   rf   r  r  r  r   rU  )r:   rZ   r]  fhr   s   &&   r2   _load_instructionsChannelIndex._load_instructionsU  s    "&v'@#
 )**II35LM-.."#yy}##$@!DqH&'PQQ#	 /.
 	 /.
 	s   :BB*	c                	    V'       d   V P                  W4       MV P                  V4      pVP                  R ^ 4      ^8  d   \        R4      hV# )rP  rQ  )r^  rb  r   rU  )r:   rZ   r   s   &&&r2   _write_or_load_instructions(ChannelIndex._write_or_load_instructionsb  sK    **6@226:L8!<q@HIIr4   c                   V ^8  d   QhRR/# r^   rm   r   r9   )ra   s   "r2   rb   r   k  s     
Q 
Q 
Qr4   c                	    V'       d.   VP                  \        4      '       d   V P                  W4      pMV P                  WV4      pV P	                  W4      p\        WV4      V3# r8   )r   r   rJ  rY  re  r   )r:   rZ   r   rm   r   s   &&&& r2   r1  ChannelIndex._patch_repodatak  sd    778PQQ@@L  ::/L 77M"6\BLPPr4   c                   V ^8  d   QhRR/# rh  r9   )ra   s   "r2   rb   r   w  s     5B 5B8B5Br4   c                  a aaaa / oS'       d/   SP                  \        4      '       d   S P                  SS4      oMVVV V3R lp\        V! 4       4      oS P	                  SS4      oVVV V3R lp\        V! 4       4      S3# )z]
Apply patches to sharded repodata.

Return {"name":{shard data}}, not full repodata format.
c               3  D  <"   SR ,          P                  4        F  w  rSP                  S,          VP                  4        R2,          p\        P                  ! \
        P                  ! VP                  4       4      4      pV SP                  SVS4      3x  K  	  R# 5i)rC  rD  N)	r   rg   rQ  msgpackloadsrE  
decompress
read_bytesrY  )rZ  	reference
shard_pathrn  rm   rY  r:   rZ   s       r2   per_shard_instructionsCChannelIndex._patch_repodata_shards.<locals>.per_shard_instructions  s     &5h&?&E&E&GNC((61y}}6G|4TT  $MM)*>*>z?T?T?V*WXE77W  'Hs   BB c               3    <"   SP                  R / 4      P                  4        U Uu/ uF  w  rV P                  RR4      VbK  	  pp pS	R,          P                  4        F  w  r4S
P                  S,          VP	                  4        R2,          p\
        P                  ! \        P                  ! VP                  4       4      4      p\        SVSVR7      pRV9   d   VR,          '       g   VR W73x  K  	  R# u upp i 5i)r)   r  r  rC  rD  )r   r   N)r   r   r   rg   rQ  rn  ro  rE  rp  rq  r   )r   r   r   rZ  rr  rs  rn  patched_shardr   rY  r:   rZ   s           r2   per_shard_apply_instructionsIChannelIndex._patch_repodata_shards.<locals>.per_shard_apply_instructions  s     
 ),,Z<BBDDDA 		*h/2D  
 #2(";"A"A"C$$v-9==?2C<0PP   i&:&::;P;P;R&ST 3E<}! -mI6N6N%i0** #Ds   $D C:B&D ,D )r   r   rJ  dictre  )r:   rZ   rY  rm   rt  rx  r   s   ffff  @r2   rL  #ChannelIndex._patch_repodata_shardsw  s     778PQQ@@L
	 	   6 89L77M	+ 	+( 023\AAr4   c                   V ^8  d   QhRR/# r^   r:  zstr | bytesr9   )ra   s   "r2   rb   r     s     
 
+ 
r4   c                	(   V R \        4        2p\        P                  P                  V P                  \        P                  P                  WP                  4      4      p\        P                  P                  V P                  \        P                  P                  W@P                  4      4      p\        P                  ! \        P                  P                  V4      RR7       \        P                  RV RV 24       V P                  W%Wc4      # ).T)rd  z_maybe_write z to )r   rU   rV   r   rg   relpathr   rX   r~   rs   rf   _maybe_write_output_paths)r:   rV   r:  r  	temp_pathr^  output_temp_paths   &&&&   r2   rI  ChannelIndex._maybe_write  s     fAegY'	 ggllrwwt5F5FG
 77<<rwwy:K:KL
 	BGGOO$45E		M$tK=9:--"2
 	
r4   c                   V ^8  d   QhRR/# r}  r9   )ra   s   "r2   rb   r     s     & &"&r4   c                   \        V\        4      '       d
   RpRpRpRpMRpRpRpRp\        VVVVR7      ;_uu_ 4       p	V	P                  V4       V'       d   V	P                  V4       RRR4       \	        V4      '       d5   \
        P                  ! W24      '       d   \        P                  ! V4       R# \
        P                  ! W24       R	#   + '       g   i     Lm; i)
z
Internal to _maybe_write.
wr  r   wbN   
)modeencodingnewlineFT)
r   r   r  writer   r   file_contents_matchrU   unlinkmove_with_fallback_nolock)
r:   r:  r^  r  r  r  r  r  newline_optionra  s
   &&&&&     r2   r  &ChannelIndex._maybe_write_output_paths  s     gs##DHG!NDHG!N
 "	
 

 HHW !
 +(()9GG		*+''(8F#
 
s   +CC	c                0   \         P                  P                  V P                  \         P                  P	                  WP
                  4      4      p\        P                  RV RV 24       \        V4      '       d   \         P                  ! V4       R# R# )zB
Remove path if it exists, rewriting to respect self.output_root.
z_maybe_remove z from N)
rU   rV   r   rg   r  r   rs   rf   r   r  )r:   rV   r^  s   && r2   r  ChannelIndex._maybe_remove  sk     ggllrwwt5F5FG
 			N4&{m<=+IIk" r4   )r   r   r   r   r{   r   r   r   r   rf   re   r   rk   rg   rl   r   rd   r   r   r   rh   r   r   rj   r   ri   )FFNr8   )FF)F)1rI   rJ   rK   rL   __doc__r   __annotations__r   r   r   CondaIndexCacher   r  r.   r$  r  r3  r  rG  r.  staticmethodr  rx  ri  rk  r  r  rw   r  r/  r4  r7  r  r  r  r  r  r5  rJ  rY  r^  rb  re  r1  rL  rI  r  r  rM   r9   r4   r2   rv   rv   w  s   (  B"K" )-1"1<1L1L!B@$ #'%B@&  $'B@(  $)B@* +B@,  $-B@. #/B@0 1B@2 3B@4 5B@ B@HJ0Z

CJ	 :xA F$L  'R 
 
.CN #.N8	.(<T5F
PE;!$F<D
Q5Bn
,&P#r4   rv   i0*  )r  r  r	  r
  r  r  reference_packager  r  source_git_tagsource_git_revr  r   rd   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r8  r8   )d
__future__r   r  r   rN  r  loggingr   rU   sysr  concurrent.futuresr   r   r   r   r   os.pathr	   r
   r   r   r   pathlibr   typingr   r   uuidr   rn  rE  conda.models.versionr   conda_package_streamingr   jinja2r   r   conda_index.index.cacher   rQ   r   r   r   r   r   r   r   r   r   r   r    r!   r  r"   r#   rz  r$   r   r(   	getLoggerrI   rs   r  r  r3   r6   local_index_timestampcached_indexlocal_subdirlocal_output_foldercached_channelsr  	cpu_countr   platformr  LOCK_TIMEOUT_SECSLOCKFILE_NAMEr\   r   r   rw  rf  r!  r=  r  r2  r0  rT  rH  r6  CHANNELDATA_FIELDSr   r   r   r   r   rv   r9   r4   r2   <module>r     s   # 
      	 
  P P ' = =  *    - 5 - 7  
  #224	D'45I S$sCx.01d3S#X#67+i(	
I !   *H     lln)) LLGb"56  -	
#@'F       " : 2 J (  B4n%P		B# B#r4   