
    <Bhp                    @   S r SSKJr  SSKrSSKrSSKJrJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJrJrJrJrJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJrJr  SSK J!r!  SSK"J#r#J$r$J%r%  SSK&J'r(  SSK)J*r*  SSK+J,r,  SSK-J.r.  SSK/J0r0J1r1J2r2  SSK3J4r4  SSK5J6r6J7r7J8r8J9r9J:r:J;r;J<r<  SSK=J>r>J?r?  SSK@JArA  SSKBJCrC  \(       a  SSKDJErEJFrF  SSKJGrGJHrH  SSK5JIrIJJrJ  SS KKJLrL  \" \M5      rNS!rOSrPS"rQ " S# S$\R5      rS " S% S&\5      rT " S' S(\SS)9rU\." S*S+S,S-9S/S. j5       rVg)0z,Tools for managing a subdir's repodata.json.    )annotationsN)UserListdefaultdict)partial)chain)	getLogger)existsgetmtimeisfilejoinsplitext)Path)time)TYPE_CHECKING)
IndexedSet   )dals)CONDA_PACKAGE_EXTENSION_V1REPODATA_FN)context)DummyExecutorThreadLimitedThreadPoolExecutordashlist)groupby_to_dict)url_to_path)join_url)
deprecated)ChannelErrorCondaUpgradeErrorUnavailableInvalidChannel)rm_rf)CACHE_STATE_SUFFIXCondaRepoInterfaceRepodataFetchRepodataStatecache_fn_urlcreate_cache_dirget_repo_interface)Channelall_channel_urls)	MatchSpec)PackageRecord)IterableIterator)AnySelf)RepodataCacheRepoInterface   )
PackageRef   s4   "(_etag|_mod|_cache_control)":[ ]?"(.*?[^\\])"[,}\s]c                  2   ^  \ rS rSr\4SU 4S jjjrSrU =r$ )SubdirDataType9   c                n  > UR                   (       d   eUR                  (       a   e[        U5      [        L d   e[	        5       nU=(       d    [
        nUR                  SS9U4nU[        R                  ;   a  [        R                  U   nUS   (       am  US   R                  S5      (       aT  UR                  5       nU(       a<  [        US-   U-   5      n[        U5      (       a  UR                  [        U5      :  a  U$ OU$ [        T	U ]=  X[!        5       S9nX8l        U[        R                  U'   U$ )NTwith_credentialsr   file:///)r2   )subdirpackage_filenametyper)   r   r   url
SubdirData_cache_
startswithr   r	   _mtimer
   super__call__r(   )
clschannelrepodata_fnnow	cache_keycache_entrychannel_url	file_pathsubdir_data_instance	__class__s
            6lib/python3.13/site-packages/conda/core/subdir_data.pyrG   SubdirDataType.__call__:   s   ~~~++++G}'''f!0[KKK6C	
***$,,Y7K|	! 7 7	 B B%kkm +K#,=,K LIi(([-?-?8ICV-V**""$w/0B0D  0  
 '*#(<
9%##     )rI   r)   rJ   strreturnrB   )__name__
__module____qualname____firstlineno__r   rG   __static_attributes____classcell__)rQ   s   @rR   r7   r7   9   s    ;F $ $rT   r7   c                  "    \ rS rSrSrSS jrSrg)PackageRecordListS   a  
Lazily convert dicts to PackageRecord.

This class inherits from the built-in UserList class and provides a way to lazily convert
dictionaries to PackageRecord objects. It overrides the __getitem__ method to check if the
item at the given index is a PackageRecord object. If not, it converts the dictionary to a
PackageRecord object and stores it in the data list.

:param data: The list of items
c                    [        U[        5      (       a  U R                  U R                  U   5      $ U R                  U   n[        U[        5      (       d  [	        S0 UD6nX R                  U'   U$ )aZ  
Returns the PackageRecord at index i. If i is a slice, returns a new instance of
PackageRecordList containing the PackageRecords at the indices in i. If the PackageRecord
at index i is not already an instance of PackageRecord, it is converted to one and stored
back in the data list.

:param i: An integer or slice object indicating the index or indices of the
          PackageRecord(s) to be returned.
:return: If i is a slice, returns a new instance of PackageRecordList containing the
         PackageRecords at the indices in i. If i is an integer, returns the PackageRecord
         at index i.
rU   )
isinstanceslicerQ   datar,   )selfirecords      rR   __getitem__PackageRecordList.__getitem___   s_     a>>$))A,//YYq\Ffm44&00%		!MrT   rU   N)rf   intrW   r,   )rX   rY   rZ   r[   __doc__rh   r\   rU   rT   rR   r_   r_   S   s    	rT   r_   c                     \ rS rSr% Sr0 rS\S'   \SS S jj5       r\	SS\
4         S!S jj5       r    S"S jr\
\4     S#S	 jjr\S$S
 j5       r\S%S j5       r\S&S j5       rS'S jr\S(S j5       r\S(S j5       r\S)S j5       r\S)S j5       r\S(S j5       rS'S jrS*S jrS+S jrS,S jrS-S jrS.S jr        S/S jrS0S jr  S1     S2S jjr! S1     S3S jjr"SS4S jjr#Sr$g)5rB   v   a  
A class representing the SubdirData.

This class provides functionality for managing and caching SubdirData instances.

:param channel: The channel object
:param repodata_fn: The name of the repodata file. Defaults to REPODATA_FN
:return: A SubdirData instance.
z5dict[tuple[str, str], PackageRecordList | SubdirData]rC   c                    U(       aO  U R                   R                  5       VVs0 s H"  u  p#US   R                  S5      (       a  M   X#_M$     snnU l         gU R                   R                  5         gs  snnf )aD  
Clear the cached local channel data.

This method is used to clear the cached local channel data. It is primarily used during
unit tests to handle changes in the CONDA_USE_ONLY_TAR_BZ2 environment variable during the
process lifetime.

:param exclude_file: A flag indicating whether to exclude file:// URLs from the cache.
r   r<   N)rC   itemsrD   clear)rH   exclude_filekvs       rR   clear_cached_local_channel_data*SubdirData.clear_cached_local_channel_data   s\     !$!2!2!4!4AaDOOI<V!4CK KK	s   A2A2Nc           	       ^ ^ [        5         Uc  [        R                  nUc  [        R                  n[	        XS9n[        R
                  (       a`  [        S U5      nUR                  SS5      nU(       a  [        R                  S[        U5      5        [        UR                  SS5      5      nSU U4S jjn[        R                  (       d  [        R                  S	:X  a  [        O[        [         [        R                  S
9nU" 5        n	[#        [$        R&                  " U	R)                  Xt5      5      5      n
SSS5        U
$ ! , (       d  f       W
$ = f)a  
Executes a query against all repodata instances in the channel/subdir matrix.

:param package_ref_or_match_spec: Either an exact `PackageRef` to match against, or a
    `MatchSpec` query object.  A `str` will be turned into a `MatchSpec` automatically.
:param channels: An iterable of urls for channels or `Channel` objects. If None, will fall
    back to `context.channels`.
:param subdirs: If None, will fall back to context.subdirs.
:param repodata_fn: The filename of the repodata.
:return: A tuple of `PackageRecord` objects.
N)subdirsc                $    U R                  S5      $ )Nr<   )rD   )rA   s    rR   <lambda>&SubdirData.query_all.<locals>.<lambda>   s    s~~i/HrT   FrU   z>Ignoring the following channel urls because mode is offline.%sTc                Z   > [        [        [        U 5      TS9R                  T5      5      $ )z
Queries the SubdirData for a given URL and returns a tuple of PackageRecord objects.

:param url: The URL of the SubdirData to query.
:return: A tuple of PackageRecord objects representing the query results.
)rJ   )tuplerB   r)   query)rA   package_ref_or_match_specrJ   s    rR   subdir_query*SubdirData.query_all.<locals>.subdir_query   s.     73<[AGG- rT   r3   )max_workers)rA   rV   rW   tuple[PackageRecord, ...])r'   r   channelsrw   r*   offlinegroupbygetloginfor   r   debugrepodata_threadsr   r   r   r|   r   from_iterablemap)r~   r   rw   rJ   channel_urlsgrouped_urlsignored_urlsr   Executorexecutorresults   `  `       rR   	query_allSubdirData.query_all   s   & 	''H?ooG'B??"#H,WL'++E26LT\* &l&6&6tR&@AL	 	  }} 8 8A = /W=U=U 	 Z8##HLL$LMF  	 Z s   /E
Ec              #  d  #    U R                   (       d  U R                  5         Un[        U[        5      (       a  [	        U5      n[        U[        5      (       a  UR                  S5      (       aF  UR                  S5      nU R                  U5       H  nUR                  U5      (       d  M  Uv   M!     gU R                  5        H  nUR                  U5      (       d  M  Uv   M!     g[        U[        5      (       d   eU R                  UR                  5       H  nXB:X  d  M
  Uv   M     g7f)z
A function that queries for a specific package reference or MatchSpec object.

:param package_ref_or_match_spec: The package reference or MatchSpec object to query.
:yields: PackageRecord objects.
nameN)_loadedloadrb   rV   r+   get_exact_value_iter_records_by_namematchiter_recordsr,   r   )re   r~   parampackage_nameprecs        rR   r}   SubdirData.query   s      ||IIK)eS!!e$EeY''$$V,,$44V< 66|DD{{4(("
 E !--/D{{4(("
 0 e]3333225::>=J ?s   B(D0.0D0"AD0'	D0c                   UR                   (       d   eUR                  (       a  UR                  5       nUS	 [        S0 UD6nXl        U R                  R                  SS9=(       d    SU l        U R                  R                  SS9=(       d    SU l        U R                  U l        U R                  U l	        X l
        X0l        SU l        SU l        g)z
Initializes a new instance of the SubdirData class.

:param channel: The channel object.
:param repodata_fn: The repodata filename.
:param RepoInterface: The RepoInterface class.
r?   Fr:    TNrU   )r>   r?   dumpr)   rI   rA   url_w_subdirurl_w_credentials	_base_url_base_url_w_credentialsrJ   r2   r   _key_mgr)re   rI   rJ   r2   partss        rR   __init__SubdirData.__init__   s     ~~~##LLNE()&&G LL,,e,DJ!%!1!14!1!H!NB**'+'='=$&*rT   c                .    U R                   R                  $ )z(
Changes as we mutate self.repodata_fn.
)
repo_fetch_repore   s    rR   r   SubdirData._repo  s    
 $$$rT   c                .    U R                   R                  $ )zZ
Returns the `RepodataCache` object associated with the current instance of `SubdirData`.
)r   
repo_cacher   s    rR   r   SubdirData.repo_cache  s    
 )))rT   c                |    [        [        U R                  5      U R                  U R                  U R
                  S9$ )zo
Object to get repodata. Not cached since self.repodata_fn is mutable.

Replaces self._repo & self.repo_cache.
)repo_interface_cls)r$   r   cache_path_baserI   rJ   r2   r   s    rR   r   SubdirData.repo_fetch!  s8     %%&LL#11	
 	
rT   c                4    SU l         U R                  5         U $ )z+
Update the instance with new information.
F)r   r   r   s    rR   reloadSubdirData.reload/  s     		rT   c           	     ~    [        [        5       [        [        U R                  U R
                  5      5      S   5      $ )z
Get the base path for caching the repodata.json file.

This method returns the base path for caching the repodata.json file. It is used to
construct the full path for caching the file.
r   )r   r'   r   r&   r   rJ   r   s    rR   r   SubdirData.cache_path_base7  s7     \$"8"8$:J:JKLQO
 	
rT   c                :    U R                   S-   U R                  -   $ )zb
Get the URL with the repodata filename.

This method returns the URL with the repodata filename.
r=   )r   rJ   r   s    rR   url_w_repodata_fnSubdirData.url_w_repodata_fnD  s        3&)9)999rT   c                f    [        U R                  [        R                  (       a  SOS-   S-   5      $ )zR
Get the path to the cache file.

This method returns the path to the cache file.
1r   z.json)r   r   r   use_only_tar_bz2r   s    rR   cache_path_jsonSubdirData.cache_path_jsonM  s.       7+C+CCLwV
 	
rT   c                n    [        U R                  [        R                  (       a  SOS-   [        -   5      $ )z
Out-of-band etag and other state needed by the RepoInterface.

Get the path to the cache state file.

This method returns the path to the cache state file.
r   r   )r   r   r   r   r"   r   s    rR   cache_path_stateSubdirData.cache_path_stateX  s4       ..sB8 !
 	
rT   c                ^    U R                   [        R                  (       a  S-   S-   $ S-   S-   $ )z`
Get the path to the cache pickle file.

This method returns the path to the cache pickle file.
r   r   z.q)r   r   r   r   s    rR   cache_path_pickleSubdirData.cache_path_pickleg  s1     ##g.F.FsORVVVBORVVVrT   c                v   U R                  5       nUR                  SS5      [        :  a!  [        [	        S5      U R
                  -  5      eUR                  SU R                  5      U l        UR                  SU R                  5      U l	        Xl
        US   U l        US   U l        US   U l        S	U l        U $ )
zw
Load the internal state of the SubdirData instance.

This method loads the internal state of the SubdirData instance.
repodata_versionr   
                The current version of conda is too old to read repodata from

                    %s

                (This version only supports repodata_version 1 and 2.)
                Please update conda to use this channel.
                base_urlbase_url_w_credentials_package_records_names_index_track_features_indexT)_loadr   MAX_REPODATA_VERSIONr   r   r   r   r   r   r   _internal_stater   r   r   r   )re   r   s     rR   r   SubdirData.loadp  s     **,1158LL#	 ((
)  ),,Z9J9JK'6':':$d&<&<(
$  / /0B C+N;%45L%M"rT   c                n    U R                   (       d  U R                  5         [        U R                  5      $ )a<  
A function that iterates over package records.

This function checks if the package records are loaded. If not loaded, it loads them. It
returns an iterator over the package records. The package_records attribute could
potentially be replaced with fully-converted UserList data after going through the entire
list.
)r   r   iterr   r   s    rR   r   SubdirData.iter_records  s%     ||IIKD))**rT   c              #  Z   #    U R                   U    H  nU R                  U   v   M     g7f)z
A function that iterates over package records by name.

This function iterates over package records and yields those whose name matches the given
name. If include_self is True, it also yields the record with the given name.
N)r   r   )re   r   rf   s      rR   r    SubdirData._iter_records_by_name  s-      ""4(A''** )s   )+c                     U R                   nUR                  5       u  p#U R                  X#5      $ ! [         a3    U R                  [
        :w  a  [
        U l        U R                  5       s $ e f = f)z
Try to load repodata. If e.g. we are downloading
`current_repodata.json`, fall back to `repodata.json` when the former is
unavailable.
)r   fetch_latest_parsed_process_raw_repodatar    rJ   r   r   )re   fetcherrepodatastates       rR   r   SubdirData._load  se    		ooG%99;OH--h>>( 	;.#. zz|#	s   .1 9A.,A.c                d    [         R                  SU R                  U R                  5        [	        U R                  S5       n[
        R                  " U R                  U[
        R                  5        SSS5        g! , (       d  f       g= f! [         a    [         R                  SSS9   gf = f)z*
Pickle the object to the specified file.
z!Saving pickled state for %s at %swbNz Failed to dump pickled repodata.Texc_info)
r   r   r   r   openpickler   r   HIGHEST_PROTOCOL	Exception)re   fhs     rR   
_pickle_meSubdirData._pickle_me  s    		III3&&&&
 d,,d3rD00"f6M6MN 433 	III84IH	Is0   AB 1A=4B =
BB B B/.B/c                    U R                  U5      nU(       a  U$ U R                  R                  5       u  p1U R                  X15      nU R                  UL d   eU R                  5         U$ )z4
Read local repodata from the cache and process it.
)_read_pickledr   
read_cache_process_raw_repodata_strr   r   )re   r   _pickled_stateraw_repodata_strr   s        rR   _read_local_repodataSubdirData._read_local_repodata  sh    
 ++E2!!"&//"<"<">889IQ##666rT   c              #    #    SUR                  S5      U R                  4v   SUR                  S5      U R                  R                  4v   SUR                  S5      [        R
                  4v   SUR                  S5      U4v   SUR                  S5      U4v   SUR                  S5      [        4v   SUR                  S5      U R                  4v   g7f)	a  
Throw away the pickle if these don't all match.

:param pickled_state: The pickled state to compare against.
:param mod: The modification information to check.
:param etag: The etag to compare against.
:yields: Tuples of the form (check_name, pickled_value, current_value).
_url	_schannel_add_pip_mod_etag_pickle_versionfnN)r   r   rI   canonical_namer   add_pip_as_python_dependencyREPODATA_PICKLE_VERSIONrJ   )re   pickled_statemodetags       rR   _pickle_valid_checksSubdirData._pickle_valid_checks  s      m''/1G1GGG=,,[94<<;V;VVVj)00
 	

 m''/44}((1477/0#
 	

 M%%d+T-=-===s   CCc           	     .  ^ ^^^ [        T[        5      (       d*  [        T R                  T R                  T R                  TS9m[        T R                  5      (       a  [        T R                  5      (       d  g [        T R                  5      (       a   [        R                  ST R                  5        [        T R                  S5       n[        R                  " U5      mSSS5        SUU U4S jjmSU4S	 jjn[        U" 5       5      (       d;  [        R                  S
T R                  T R                  [!        T" 5       5      5        gT$ ! , (       d  f       Nr= f! [         a,    [        R                  SSS9  [        T R                  5         gf = f)z
Read pickled repodata from the cache and process it.

:param state: The repodata state.
:return: A dictionary containing the processed pickled repodata, or None if the repodata is
    not pickled.
dictNzfound pickle file %srbz Failed to load pickled repodata.Tr   c                 R   > TR                  T TR                  TR                  5      $ )z
Generate a list of checks to verify the validity of a pickled state.

:return: A list of tuples, where each tuple contains a check name, the value from the
    pickled state, and the current value.
)r  r  r  )r   re   r   s   rR   checks(SubdirData._read_pickled.<locals>.checks  s"     ,,^UYY

SSrT   c               3  <   >#    T" 5        H  u  pnX:H  v   M     g7f)z
Generate a generator that yields the results of checking the validity of a pickled
state.

:yields: True if the pickled state is valid, False otherwise.
NrU   )_leftrightr  s      rR   _check_pickled_valid6SubdirData._read_pickled.<locals>._check_pickled_valid  s       #)(m# #+s   z.Pickle load validation failed for %s at %s. %r)rW   z%Iterator[tuple[str, str | None, str]])rW   zIterator[bool])rb   r%   r   r   rJ   r   r   r   r   r   r   r   r   r!   allr   r|   )re   r   r   r  r   r  s   ``  @@rR   r   SubdirData._read_pickled  s@    %//!$$%%  	E d,,--VD<P<P5Q5Q	d,,--		0$2H2HId,,d3r!'R 4	T 	T	$ ')**II@&&$$fh	 G 43 	II84IH$(()	s1   :AE 
E!E 
EE E 3FFc                ^    [         R                  " U=(       d    S5      nU R                  X2S9$ )zState contains information that was previously in-band in raw_repodata_str.

Process the raw repodata string and return the processed repodata.

:param raw_repodata_str: The raw repodata string.
:return: A dictionary containing the processed repodata.
z{})r   )jsonloadsr   )re   r   r   json_objs       rR   r   $SubdirData._process_raw_repodata_str1  s,     ::.6$7))()@@rT   c                l  ^ [        U[        5      (       d*  [        U R                  U R                  U R                  US9nUR                  S0 5      R                  S5      =(       d    U R                  R                  nX0R                  R                  :X  d   e[        R                  nU R                  R                  n[        5       =U l        n[        [        5      =U l        n[        [        5      =U l        nU R#                  USS9n	U R#                  USS9n
0 SU R                  _SU R$                  _S	U R&                  _S
U	_SU
_SU R(                  _SU R                  _SU_SU_SU_SUR                  S5      _SUR                  S5      _SUR                  S5      _SUR                  S5      _SU_S[*        _SU_SUR                  SS5      0EnUS   [,        :  a!  [/        [1        S5      U R$                  -  5      eUR                  S0 5      R                  S5      U R                  UR                  S0 5      R                  S5      UUS.nUR                  S0 5      m[        R2                  (       a  0 OUR                  S0 5      n[4        n[7        TR9                  5       5      UR9                  5       Vs1 s H
  oS S! U-   iM     sn-
  nUR;                  5       S4U4S" jU5       S44 GH/  u  nnU GH!  u  nnU(       aF  US [=        S#5      *   S$3nUT;   a.  TU   R                  S%5      US&'   TU   R                  S'5      US('   U(       a6  US)   S*:X  a-  US+   R?                  S,5      (       a  US-   RA                  S.5        URC                  U5        UR                  S/S5      S0:  a  [D        RG                  S1US/   US2   5        M  UUS'   [I        U
U5      US2'   URA                  U5        [=        U5      S0-
  nUUS)      RA                  U5        GM$     GM2     Xl%        U$ s  snf )3z
Process the raw repodata dictionary and return the processed repodata.

:param repodata: The raw repodata dictionary.
:param state: The repodata state. Defaults to None.
:return: A dictionary containing the processed repodata.
r  r   r>   Fr:   TrI   r   r   r   r   r   r   r   r   r   r   r   _cache_controlr   r   r   r   r   r   r   archplatform)r  rI   r  schannelr>   packageszpackages.condaNic              3  0   >#    U  H  oTU   4v   M     g 7fNrU   ).0rr   legacy_packagess     rR   	<genexpr>3SubdirData._process_raw_repodata.<locals>.<genexpr>  s     E/D!/!$%/Ds   z.condaz.tar.bz2md5legacy_bz2_md5sizelegacy_bz2_sizer   pythonversion)z2.z3.dependspiprecord_versionr3   z"Ignoring record_version %d from %srA   )&rb   r%   r   r   rJ   r   rI   r>   r   r   r   r_   r   r   listr   r   _get_base_urlr   r   r   r   r   r   r   r   r   setkeysro   lenrD   appendupdater   r   r   r   )re   r   r   r>   add_pipr  r   r   r   r   r   r   meta_in_commonconda_packages_tar_bz2rr   use_these_legacy_keysgroupcopy_legacy_md5r   r   counterpartrecord_indexr#  s                          @rR   r    SubdirData._process_raw_repodata@  s    %//!$$%%  	E fb)--h7N4<<;N;N,,,,,66<<..3D3FF 0+6t+<<L=H=NN"%:%%h%G!%!3!3Ht!3!T
t||
D--
  !7!7
 	

 %&<
 t33
 $""
  0
 L
 $%:
 UYYw'
 EIIf%
 eii(89
 EIIf%
 
  6!
" #
$ 		*<a @%
( -.1EE#	 ##
$  LL,008|| VR044Z@ 
 #,,z26**B=Mr0R 	 . #O$8$8$: ;'5':':'<?
'<!crFX'<?
 !

 !!#T*E/DEuM'
"E? "D"%'(83x=.%9$:("CK"o51@1M1Q1QRW1X-.2A+2N2R2R"3./ V0Y22<@@O**51N+88,a014II<-.U
   T
&'=rBU ''-"#34q8T&\*11,?; "	'
F  /Q?
s    P1c                   UR                  S0 5      R                  S5      nU(       a   [        U5      R                  5       nU(       a  U R                  U R                  :w  a  U R
                  R                  5       nS HP  nUR                  U5      (       a  [	        SU R                   S	35      eUR                  U5      nU(       d  ML  XU'   MR     [        S0 UD6R                  S
S9$ U$ U(       a  U R                  $ U R                  $ ! [         a6  n[	        SU R
                  R                   SU R                   S35      UeSnAff = f)a  
In repodata_version=1, .tar.bz2 and .conda artifacts are assumed to
be colocated next to repodata.json, in the same server and directory.

In repodata_version=2, repodata.json files can define a 'base_url' field
to override that default assumption. See CEP-15 for more details.

This method deals with both cases and returns the appropriate value.

Get the base URL for the given endpoint.

:param endpoint: The endpoint for which the base URL is needed.
:return: The base URL corresponding to the provided endpoint.
r   r   zSubdir for z	 at url 'z' has invalid 'base_url'N)authtoken'z9' has 'base_url' with credentials. This is not supported.Tr:   rU   )
r   r)   r   
ValueErrorr   rI   r   r   r   rA   )	re   r   r;   maybe_base_urlbase_url_partsexcchannel_partskeychannel_credss	            rR   r0  SubdirData._get_base_url  sR    "fb155jA!(!8!=!=!?  D$:$:d>O>O$O !% 1 1 3,C%))#..* 1 12 35 5  %2$5$5c$:M$}.;s+ - 0044d4KK!!)))   /  "!$,,"="=!>iHYHYGZ [- - s   D 
E1EE)r2   r   r   r   r   r   r   r   r   rI   rJ   r   r   )T)rq   boolrW   None)
r~   zPackageRef | MatchSpec | strr   zIterable[Channel | str] | Nonerw   zIterable[str] | NonerJ   rV   rW   r   )r~   zstr | MatchSpecrW   Iterator[PackageRecord])rI   r)   rJ   rV   r2   ztype[RepoInterface])rW   r2   )rW   r1   )rW   r$   )rW   r0   )rW   rV   )rW   r   )rW   rN  )r   rV   rW   rN  )rW   dict[str, Any])rW   rM  )r   r%   rW   rO  )r  rO  r  rV   r  rV   rW   zIterator[tuple[str, Any, Any]])r   r%   rW   zdict[str, Any] | Noner!  )r   rV   r   RepodataState | NonerW   rO  )r   rO  r   rP  rW   rO  )r   r  r;   rL  rW   rV   )%rX   rY   rZ   r[   rk   rC   __annotations__classmethodrt   staticmethodr   r   r}   r#   r   propertyr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r0  r\   rU   rT   rR   rB   rB   v   s    FHGBG   &  48(,&	;#?;0; &; 	;
 
#; ;z)8	 B '-?	  +	@ % % * * 
 
 

 

 : : 
 
 
 
 W WB++"I >+>25>=@>	'>6:~ '+AA $A 
	A  GKv&v/Cv	vp*! *!rT   rB   )	metaclassz25.3z25.9z>Use `conda.core.models.records.PackageRecord.feature` instead.)addendumc                .    [         R                  " U 5      $ )z
Create a feature record based on the given feature name.

:param feature_name: The name of the feature
:return: The created PackageRecord for the feature.
)r,   feature)feature_names    rR   make_feature_recordrZ    s       ..rT   )rY  rV   rW   r,   )Wrk   
__future__r   r  r   collectionsr   r   	functoolsr   	itertoolsr   loggingr   os.pathr	   r
   r   r   r   pathlibr   r   typingr   boltons.setutilsr   
auxlib.ishr   base.constantsr   r   base.contextr   	common.ior   r   r   common.iteratorsr   r   common.pathr   
common.urlr   deprecationsr   
exceptionsr   r   r    gateways.disk.deleter!   gateways.repodatar"   r#   r$   r%   r&   r'   r(   models.channelr)   r*   models.match_specr+   models.recordsr,   collections.abcr-   r.   r/   r0   r1   r2   indexr4   rX   r   r   r   REPODATA_HEADER_REr@   r7   r_   rB   rZ  rU   rT   rR   <module>ru     s    3 "   -    < <     '  D " P P 9 % ! % S S (   7 ) *2 @!  O $T $4   Fl	!> l	!^ 

M
/
/rT   