+
    :1j`                    >   R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^RI
HtHtHt ^RIHt ^RIHtHt ^R	IHt ^R
IHtHt ^RIHtHtHtHtHtHtHtH t H!t!H"t" ^RI#H$t$ ]	'       d   ^ RI%H&t&H't' ^ RIH(t( ^RIH)t) ^RIH*t* ]! ]+4      t, ! R R4      t- ! R R]-4      t.R R lt/R R lt0R R lt1R R lt2R R lt3R R  lt4R/R" R# llt5R0R$ R% llt6R& R' lt7R( R) lt8]Pr                  ! ]-Pt                  4       ]$Pv                  ! R*R+R,]<! ]-4      R-R.7       R!# )1zDefines Channel and MultiChannel objects and other channel-related functions.

Object inheritance:

.. autoapi-inheritance-diagram:: Channel MultiChannel
   :top-classes: conda.models.channel.Channel
   :parts: 1
)annotations)copy)cache)	getLogger)TYPE_CHECKING)DEFAULTS_CHANNEL_NAMEMAX_CHANNEL_PRIORITYUNKNOWN_CHANNEL)context)ensure_text_type
isiterable)unique)is_pathwin_path_backout)
Url
has_schemeis_urljoin_urlpath_to_urlpercent_decodesplit_conda_url_easy_partssplit_platformsplit_scheme_auth_tokenurlparse)
deprecated)IterableIterator)Any)Context)PathTypec                    a  ] tR t^5tRt]R R l4       tV 3R ltR6R R llt]	R R l4       t
]	R	 R
 l4       t]	R R l4       t]R R l4       t]R R l4       t]]R R l4       4       t]R7R R ll4       t]	R R l4       tR8R R lltR9R R llt]	R R l4       t]	R R l4       t]	R R  l4       t]	R! R" l4       tR# R$ ltR% R& ltR' R( ltR) R* ltR+ R, ltR- R. ltR/ R0 lt]	R1 R2 l4       t R3 R4 lt!R5t"V ;t## ):Channelz
Channel:
scheme <> auth <> location <> token <> channel <> subchannel <> platform <> package_filename

Package Spec:
channel <> subchannel <> namespace <> package_name

c                   V ^8  d   QhRR/#    returnNone )formats   "4lib/python3.14/site-packages/conda/models/channel.py__annotate__Channel.__annotate__@   s     ) )$ )    c                 	B    \         P                  P                  4        R # N)r!   
from_valuecache_clearr'   r,   r)   _reset_stateChannel._reset_state?   s    &&(r,   c                	l  <a  \        V4      ^8X  d;   V'       g3   V^ ,          p\        V\        4      '       d   V# S P                  V4      # RV9   dT   \        ;QJ d    . V 3R lVR,           4       F  NK  	  5M! V 3R lVR,           4       4      p\        VR,          V4      # \        SS `  S 4      # )   channelsc              3  4   <"   T F  pS! R/ VB x  K  	  R # 5i)Nr'   r'   ).0_kwclss   & r)   	<genexpr>"Channel.__new__.<locals>.<genexpr>J   s     F3ECSZ3Z3Es   name)len
isinstancer!   r/   tupleMultiChannelsuper__new__)r9   argskwargsvaluer5   	__class__s   f*,  r)   rB   Channel.__new__C   s    t9>&GE%))>>%((uF6*3EFuuF6*3EFFHv99ws##r,   c               4    V ^8  d   QhRRRRRRRRRRRRRR/# )	r$   scheme
str | Noneauthlocationtokenr<   platformpackage_filenamer'   )r(   s   "r)   r*   r+   N   sP     1 11 1 	1
 1 1 1 %1r,   c                	    V P                   '       d   R # Wn        W n        W0n        W@n        T;'       g    RV n        W`n        Wpn        R # )N )__dict__rI   rK   rL   rM   r<   rN   rO   )selfrI   rK   rL   rM   r<   rN   rO   s   &&&&&&&&r)   __init__Channel.__init__N   s<     ===	 
JJB	  0r,   c                   V ^8  d   QhRR/# r$   r%   rJ   r'   )r(   s   "r)   r*   r+   c   s      * r,   c                	    V P                   # r.   rL   rS   s   &r)   channel_locationChannel.channel_locationb       }}r,   c                   V ^8  d   QhRR/# r$   r%   strr'   )r(   s   "r)   r*   r+   g   s      c r,   c                	    V P                   # r.   r<   rZ   s   &r)   channel_nameChannel.channel_namef       yyr,   c                   V ^8  d   QhRR/# rW   r'   )r(   s   "r)   r*   r+   k   s      
 r,   c                	    V P                   # r.   )rN   rZ   s   &r)   subdirChannel.subdirj   r]   r,   c                    V ^8  d   QhRRRR/# r$   urlr`   r%   r!   r'   )r(   s   "r)   r*   r+   o   s     , ,c ,g ,r,   c                	    \        V 4      # r.   )parse_conda_channel_urlrl   s   &r)   from_urlChannel.from_urln   s    &s++r,   c                    V ^8  d   QhRRRR/# r$   rc   r`   r%   r!   r'   )r(   s   "r)   r*   r+   s   s     3 3 3 3r,   c                	    \        V 4      # r.   )_get_channel_for_name)rc   s   &r)   from_channel_nameChannel.from_channel_namer   s    $\22r,   c                    V ^8  d   QhRRRR/# )r$   rE   rJ   r%   r!   r'   )r(   s   "r)   r*   r+   x   s     /8 /8* /8 /8r,   c                   V R9   d   \        \        R7      # \        V 4      p \        V 4      '       d8   V P	                  R4      '       d   \        V 4      p \         P                  V 4      # \        V 4      '       d   \         P                  \        V 4      4      # \        P                  P                  V 4      '       d8   V P	                  R4      '       d   \        V 4      p \         P                  V 4      # \        \        P                  V 4      w  rV\        P                  9   d#   \        V\        P                  V,          V4      # \         P!                  V 4      # )a  Construct a new :class:`Channel` from a single value.

Args:
  value: Anyone of the following forms:

    `None`, or one of the special strings "<unknown>", "None:///<unknown>", or "None":
        represents the unknown channel, used for packages with unknown origin.

    A URL including a scheme like ``file://`` or ``https://``:
        represents a channel URL.

    A local directory path:
        represents a local channel; relative paths must start with ``./``.

    A package file (i.e. the path to a file ending in ``.conda`` or ``.tar.bz2``):
        represents a channel for a single package

    A known channel name:
        represents a known channel, e.g. from the users ``.condarc`` file or
        the global configuration.

Returns:
  A channel object.
rb   zfile:)Nz	<unknown>zNone:///<unknown>r&   )r!   r	   r   r   
startswithr   rp   r   r   r
   plugin_managerhas_package_extensionr   known_subdirscustom_multichannelsr@   rv   )rE   	_strippedrN   s   &  r)   r/   Channel.from_valuev   s   6 DD00 'e(((/##E**U^^##K$677##99%@@(((/##E** #11F1F"NIG888#w;;IF  0077r,   c               (    V ^8  d   QhRRRRRRRR/# )r$   channel_aliasr!   channel_urlr`   r<   rJ   r%   r'   )r(   s   "r)   r*   r+      s,     " ""-0"8B"	"r,   c           	     	   T p\        V4      w  rErgV'       d(   V'       d    \        VVVVVP                  R 4      R7      # V'       d   VP                  '       dK   VP	                  VP                  4      '       d*   VP                  VP                  VP                  R^4      r(MK\        V4      p	\        \        V	P                  V	P                  R7      4      pV	P                  ;'       g    Rp\        VVVVVP                  R 4      R7      # \        VP                  VP                  VP                  VP                  T;'       d    VP                  R 4      ;'       g    VP                  R 4      R7      # )/)rI   rK   rL   rM   r<   rQ   hostnameport)r   r!   striprL   rz   replacer   r`   r   r   r   pathrI   rK   rM   )
r   r   r<   catest_urlrI   rK   rM   rL   	url_partss
   &&&       r)   make_simple_channelChannel.make_simple_channel   s-    (?(L%$F!ZZ_  {{{x222;;??!#h.>.>r{{BPQ.R$$X.	sI,>,>Y^^TU ~~++!ZZ_  yyWWhh--djjoGG1B1B31G r,   c                   V ^8  d   QhRR/# r_   r'   )r(   s   "r)   r*   r+      s     & & &r,   c                	  a   S P                   #   \         d     Mi ; i\        P                  P	                  4        F8  w  rT F-  pS P
                  TP
                  8X  g   K   T;pS n         Tu u # 	  K:  	  \        P                   Fh  pS P
                  '       g   K  \        S P
                  P                  R 4      TP                  R 4      4      '       g   KS  S P
                  ;pS n         Tu # 	  \        ;QJ d>    T 3R l\        P                  .\        P                  O 4       F  '       g   K   RM3	  RM/! T 3R l\        P                  .\        P                  O 4       4      '       d   S P
                  ;pS n         T# S P                  '       d9   S P                   R\        S P                  S P
                  4       2;pS n         T# \        S P                  S P
                  4      P                  R 4      ;pS n         T# )r   c              3  V   <"   T F  pVP                   SP                   8H  x  K   	  R # 5ir.   rY   )r7   aliasrS   s   & r)   r:   )Channel.canonical_name.<locals>.<genexpr>   s)      
 NNdmm+s   &)TF://)_Channel__canonical_nameAttributeErrorr
   r~   itemsr<   custom_channelstokenized_startswithsplitanyr   migrated_channel_aliasesrI   r   rL   lstrip)rS   	multinamer5   channelcn	that_names   f     r)   canonical_nameChannel.canonical_name   s   	((( 		 $+#?#?#E#E#GI#99,1::B.I $ $H !00Iyyy1		$iooc&:  .2YY6T*	 1 3 
 %%11
333 
 %%11
 
 
 *.2B&I ;;;;;-s8DMM499#E"FGB& I)1$--)K)R)RSV)WWB&Is    c               $    V ^8  d   QhRRRRRR/# r$   with_credentialsboolsubdirsIterable[str] | Noner%   z	list[str]r'   )r(   s   "r)   r*   r+      s(     <; <;<; &<; 
	<;r,   c                  a aa Se!   \        S4      '       g   \        RS R24      hS P                  \        8X  d    \	        \
        4      P                  VS4      # S P                  .oV'       d0   S P                  '       d   SP                  RS P                  .4       SP                  S P                  4       \        S!  oR V V3R llpV3R lV! 4        4       pV'       dA   S P                  '       d/   V Uu. uF!  pS P                   RS P                   RV 2NK#  	  up# V Uu. uF  pS P                   RV 2NK  	  up# u upi u upi )	a=  Generate URLs for this channel across specified platforms.

Args:
    with_credentials: If True, include authentication credentials (token, auth) in URLs.
    subdirs: Specific platform subdirs to generate URLs for. If None, uses the channel's
            platform (if defined) or falls back to `context.subdirs`. If this is explicitly
            provided, overrides any platform defined in the channel.

Examples:
    >>> channel = Channel("conda-forge")
    >>> channel.urls()  # Uses context.subdirs
    ['https://conda.anaconda.org/conda-forge/linux-64',
    'https://conda.anaconda.org/conda-forge/noarch']

    >>> channel = Channel("conda-forge/linux-aarch64")
    >>> channel.urls()  # Uses channel's platform
    ['https://conda.anaconda.org/conda-forge/linux-aarch64',
    'https://conda.anaconda.org/conda-forge/noarch']

    >>> channel.urls(subdirs=("osx-64", "noarch"))
    ['https://conda.anaconda.org/conda-forge/osx-64',
    'https://conda.anaconda.org/conda-forge/noarch']

Returns:
    list[str]: List of URLs for accessing this channel's specified subdirectories.
z/`subdirs` must be an iterable of strings. Got: .tc                   V ^8  d   QhRR/# )r$   r%   zIterator[str]r'   )r(   s   "r)   r*   "Channel.urls.<locals>.__annotate__$  s     		+ 		+M 		+r,   c               3     <"   Se   S R j  xL
  R # S P                   '       d(   S P                   x  S P                   R8w  d   Rx  R # R # \        P                   R j  xL
  R #  LY L5i)Nnoarch)rN   r
   r   )rS   r   s   r)   
_platforms Channel.urls.<locals>._platforms$  sW     """"mm#==H,"N - #??** # +s&   
A+A'A+:A+ A)!A+)A+c              3  <   <"   T F  p\        SV4      x  K  	  R # 5ir.   )r   )r7   pbases   & r)   r:   Channel.urls.<locals>.<genexpr>/  s     9Lq$""Ls   r   @)r   
ValueErrorr   r	   r!   r   urlsrL   rM   extendappendr<   r   rK   rI   )rS   r   r   r   basesbr   s   f&f   @r)   r   Channel.urls   s   > z'':':A'!L  /101667GQQ


KKdjj)*DII		+ 		+ :JL9			@EF1t{{m3tyyk1#6FF49:Eqt{{m3qc*E:: G:s   ='E+Ec                    V ^8  d   QhRRRR/# )r$   r   r   r%   rJ   r'   )r(   s   "r)   r*   r+   5  s     - -D -Z -r,   c                	   V P                   \        8X  d   R # V P                  .pV'       d0   V P                  '       d   VP	                  RV P                  .4       VP                  V P                  4       V P                  '       dJ   VP                  V P                  4       V P                  '       d   VP                  V P                  4       M2\        R \        P                   4       R4      pVP                  V4       \        V!  pV'       d1   V P                  '       d   V P                   RV P                   RV 2# V P                   RV 2# )Nr   c              3  6   "   T F  qR 8w  g   K  Vx  K  	  R# 5i)r   Nr'   )r7   ss   & r)   r:   Channel.url.<locals>.<genexpr>C  s     =OqH}Os   
r   r   r   )r   r	   rL   rM   r   r   r<   rN   rO   nextr
   r   r   rK   rI   )rS   r   r   first_non_noarchs   &&  r)   rl   Channel.url5  s    /1


KKdjj)*DII===KK&$$$D112#=GOO=x  KK()			kk]#dii[$88kk]#dV,,r,   c                   V ^8  d   QhRR/# rW   r'   )r(   s   "r)   r*   r+   O  s     G G* Gr,   c                	    V P                   \        8X  d   R # V P                   R\        V P                  V P
                  4       2# )Nr   )r   r	   rI   r   rL   r<   rZ   s   &r)   base_urlChannel.base_urlN  s8    /1++c(4==$))"D!EFFr,   c                   V ^8  d   QhRR/# r$   r%   ztuple[str | None, ...]r'   )r(   s   "r)   r*   r+   U  s        1  r,   c                	    V P                   3# r.   r   rZ   s   &r)   	base_urlsChannel.base_urlsT  s    r,   c                   V ^8  d   QhRR/# r_   r'   )r(   s   "r)   r*   r+   Y  s      C r,   c                	    V P                  R 4      pV P                  '       d"   V'       d   VP                  R^4      ^ ,          pV# )Tr   )rl   rO   rsplit)rS   rl   s   & r)   
subdir_urlChannel.subdir_urlX  s7    hhtn   S**S!$Q'C
r,   c                   V ^8  d   QhRR/# r$   r%   tuple[Channel, ...]r'   )r(   s   "r)   r*   r+   `  s      - r,   c                	    V 3# r.   r'   rZ   s   &r)   r5   Channel.channels_  s	    wr,   c                   V ^8  d   QhRR/# r_   r'   )r(   s   "r)   r*   r+   c  s       r,   c                	    V P                   ;'       g    V P                  pV P                  '       d   \        WP                  4      # V# r.   )r   r<   rh   r   )rS   r   s   & r)   __str__Channel.__str__c  s4    }}))		;;;D++..Kr,   c                   V ^8  d   QhRR/# r_   r'   )r(   s   "r)   r*   r+   j  s     
 
# 
r,   c                	    R V P                   '       d'   \        V P                  V P                   4      ,          # V P                  ,          # )zChannel("%s"))rh   r   r<   rZ   s   &r)   __repr__Channel.__repr__j  s:    04HTYY,
 	
AE
 	
r,   c                    V ^8  d   QhRRRR/# )r$   otherr   r%   r   r'   )r(   s   "r)   r*   r+   o  s      C D r,   c                	   \        V\        4      '       d\   V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  #  \        V4      pV P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  #   \
         d"   p\        P                  R T4        Rp?R# Rp?ii ; i)z%rNF)r>   r!   rL   r<   rN   	Exceptionlogdebug)rS   r   _otheres   &&  r)   __eq__Channel.__eq__o  s    eW%%/ 4 4II+4 4MMU^^3	 MMV__4 9 9		V[[09 98
  		$"s$   3*C  C ?C D$D  Dc                   V ^8  d   QhRR/# )r$   r%   intr'   )r(   s   "r)   r*   r+     s     ? ?# ?r,   c                	Z    \        V P                  V P                  V P                  34      # r.   )hashrL   r<   rN   rZ   s   &r)   __hash__Channel.__hash__  s     T]]DIIt}}=>>r,   c                   V ^8  d   QhRR/# r$   r%   r   r'   )r(   s   "r)   r*   r+     s     / /T /r,   c                	D    \        V P                  V P                  34      # r.   )r   rL   r<   rZ   s   &r)   __nonzero__Channel.__nonzero__  s    DMM499-..r,   c                   V ^8  d   QhRR/# r   r'   )r(   s   "r)   r*   r+     s     " "$ "r,   c                	"    V P                  4       # r.   )r   rZ   s   &r)   __bool__Channel.__bool__  s    !!r,   c                   V ^8  d   QhRR/# r$   r%   zdict[str, Any]r'   )r(   s   "r)   r*   r+     s      . r,   c                	    V P                   # r.   )rR   rZ   s   &r)   __json__Channel.__json__  s    }}r,   c                   V ^8  d   QhRR/# )r$   r%   ztuple[str | None, str]r'   )r(   s   "r)   r*   r+     s     2 2!7 2r,   c                	2    V P                   V P                  3# r.   )r   r   rZ   s   &r)   url_channel_wtfChannel.url_channel_wtf  s    }}d1111r,   c                   V ^8  d   QhRR/# r   r'   )r(   s   "r)   r*   r+     s     	
 	
n 	
r,   c                	    R V P                   RV P                  RV P                  RV P                  RV P                  RV P
                  RV P                  /# rI   rK   rL   rM   r<   rN   rO   r	  rZ   s   &r)   dumpChannel.dump  sM    dkkDIITZZDII 5 5
 	
r,   )__canonical_namerK   rL   r<   rO   rN   rI   rM   )NNNNNNNr.   FNF)$__name__
__module____qualname____firstlineno____doc__staticmethodr1   rB   rT   propertyr[   rc   rh   rp   rv   r   r/   r   r   r   rl   r   r   r   r5   r   r   r   r   r   r   r  r  r
  __static_attributes____classcell__)rF   s   @r)   r!   r!   5   so    ) )	$1(       , , 3 3 
/8  /8b " "H & &P<;|-2 G G
        

&?/" 2 2	
 	
r,   r!   c                      ] tR tRtRR R llt]R R l4       tRR R llt]R	 R
 l4       t]R R l4       t	RR R llt
]R R l4       tR R ltRtR# )r@   i  Nc               $    V ^8  d   QhRRRRRR/# )r$   r<   r`   r5   zIterable[Channel] | NonerN   rJ   r'   )r(   s   "r)   r*   MultiChannel.__annotate__  s(     % %% +% 	%r,   c                	   a V P                   '       d   R # Wn        R V n        Vf	   RV n        M$S'       d   V3R lV 4       p\	        V4      V n        R V n        R V n        R V n        SV n        R V n	        R # )Nc              3  b   <"   T F$  p\        R/ / VP                  4       CR S/CB x  K&  	  R# 5i)rN   Nr'   )r!   r
  )r7   r   rN   s   & r)   r:   (MultiChannel.__init__.<locals>.<genexpr>  s3      #+ GFFXFG#+s   ,/r'   )
rR   r<   rL   	_channelsr?   rI   rK   rM   rN   rO   )rS   r<   r5   rN   s   &&&fr)   rT   MultiChannel.__init__  sm     ===	DN#+ #8_DN	
  $r,   c                   V ^8  d   QhRR/# r_   r'   )r(   s   "r)   r*   r    s       r,   c                	    V P                   # r.   rb   rZ   s   &r)   r   MultiChannel.canonical_name  re   r,   c               $    V ^8  d   QhRRRRRR/# r   r'   )r(   s   "r)   r*   r    s(     	
 	
	
 &	
 
		
r,   c                	z    V P                    UUu. uF  pVP                  W4       F  pVNK  	  K  	  upp# u uppi r.   )r5   r   )rS   r   r   r   rl   s   &&&  r)   r   MultiChannel.urls  sD      ==
(||$4> > (
 	
 
s   #7c                   V ^8  d   QhRR/# r#   r'   )r(   s   "r)   r*   r    s      $ r,   c                	    R # r.   r'   rZ   s   &r)   r   MultiChannel.base_url  s    r,   c                   V ^8  d   QhRR/# r   r'   )r(   s   "r)   r*   r    s     D D1 Dr,   c                	    \         ;QJ d    . R  V P                   4       F  NK  	  5# ! R  V P                   4       4      # )c              3  8   "   T F  qP                   x  K  	  R # 5ir.   r   r7   r   s   & r)   r:   )MultiChannel.base_urls.<locals>.<genexpr>  s     C]'%%]   r?   r5   rZ   s   &r)   r   MultiChannel.base_urls  s,    uCT]]CuCuCT]]CCCr,   c                    V ^8  d   QhRRRR/# )r$   r   r   r%   r&   r'   )r(   s   "r)   r*   r    s      D T r,   c                	    R # r.   r'   )rS   r   s   &&r)   rl   MultiChannel.url  s    r,   c                   V ^8  d   QhRR/# r   r'   )r(   s   "r)   r*   r    s      - r,   c                	    V P                   # r.   )r  rZ   s   &r)   r5   MultiChannel.channels  s    ~~r,   c                   V ^8  d   QhRR/# r   r'   )r(   s   "r)   r*   r    s     
 
n 
r,   c                	    R V P                   R\        ;QJ d    . R V P                   4       F  NK  	  5/# ! R V P                   4       4      /# )r<   r5   c              3  @   "   T F  qP                  4       x  K  	  R # 5ir.   )r
  r,  s   & r)   r:   $MultiChannel.dump.<locals>.<genexpr>  s     JMllnnMs   )r<   r?   r5   rZ   s   &r)   r
  MultiChannel.dump  sF    DIIJDMMJ
 	
JDMMJJ
 	
r,   )r  rK   rL   r<   rO   rN   rI   rM   )NNr  r  )r  r  r  r  rT   r  r   r   r   r   rl   r5   r
  r  r'   r,   r)   r@   r@     sm    %>  	
   D D  
 
r,   r@   c               $    V ^8  d   QhRRRRRR/# )r$   test_iterablezIterable[Any]startswith_iterabler%   r   r'   )r(   s   "r)   r*   r*     s)     M M M7DM	Mr,   c                    \         ;QJ d%    R  \        W4       4       F  '       d   K   R# 	  R# ! R  \        W4       4       4      # )c              3  .   "   T F  w  rW8H  x  K  	  R # 5ir.   r'   )r7   r   sws   &  r)   r:   'tokenized_startswith.<locals>.<genexpr>  s     L$K51qw$Ks   FT)allzip)r=  r>  s   &&r)   r   r     s7     3LC$KL33L3L3LC$KLLLr,   c               $    V ^8  d   QhRRRRRR/# )r$   r   zIterable[str]startswith_urlr%   r   r'   )r(   s   "r)   r*   r*     s$      -:	r,   c                   \        V 4      \        V4      rV P                  VP                  8w  g   V P                  VP                  8w  d   R # R p\        V! V 4      P	                  R4      V! V4      P	                  R4      4      # )Fc                L    V P                   P                  R 4      ;'       g    R # )r   )r   r   ro   s   &r)   <lambda>0tokenized_conda_url_startswith.<locals>.<lambda>  s    s 3 : :s :r,   r   )r   r   r   r   r   )r   rF  norm_url_paths   && r)   tokenized_conda_url_startswithrL    sv      (18N3Kn^444==N///:Mh%%c*M.,I,O,OPS,T r,   c                    V ^8  d   QhRRRR/# rs   r'   )r(   s   "r)   r*   r*     s     
 
 
 
r,   c           	     :  a R  V3R llo\        \        P                  V 4      w  rS! V4      pVe"   \        V4      pWn        V'       d   W#n        V# \        P                  p\        VP                  VP                  VP                  VP                  VVR7      # )c                    V ^8  d   QhRRRR/# )r$   r<   r`   r%   zChannel | Noner'   )r(   s   "r)   r*   +_get_channel_for_name.<locals>.__annotate__  s     ; ;3 ;> ;r,   c                   < V \         P                  9   d   \         P                  V ,          # V P                  R ^4      ^ ,          pW8X  d   R# S! V4      # )r   N)r
   r   r   )r<   	test_name_get_channel_for_name_helpers   & r)   rS  ;_get_channel_for_name.<locals>._get_channel_for_name_helper  sK    7*****400C+A.I /	::r,   )rI   rK   rL   rM   r<   rN   )r   r
   r}   r   r<   rN   r   r!   rI   rK   rL   rM   )rc   r   rN   r   r   rS  s   &    @r)   ru   ru     s    ; ; ))>)>MI*95G w- '""99[[((
 	
r,   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )r$   rI   rJ   hostr   r   r%   zAtuple[str | None, str | None, str | None, str | None, str | None]r'   )r(   s   "r)   r*   r*     s;     Z ZZ(Z0:ZBLZFZr,   c                   T;'       d    VP                  R 4      p\        \        WVR7      4      pV'       g4   \        \        WR7      4      P                  R 4      RT ;'       g    RRR3# \        \        P
                  P                  4       RR R7       F  w  rV\        V4      w  rgr\        V\        We4      4      '       g   K0  VP                  \        We4      R^4      P                  R 4      p
\        WZ4      p\        V4      pVP                  VVP                  VP                  VP                   3u # 	  \        P"                   F  pVP%                  VP                  4      '       g   K&  VP                  VP                  R^4      P                  R 4      p\        P&                  pVP                  W^P                  VP                  VP                   3u # 	  \        \        P(                  P                  4       RR R7       F  w  r\\        VP                  VP*                  4      p\-        VP/                  R 4      VP/                  R 4      4      '       g   KW  VP                  VR^4      P                  R 4      p
VP                  \        VP*                  V
4      V VP                  VP                   3u # 	  \        P&                  pVP                  '       d   \-        VP/                  R 4      VP                  P/                  R 4      4      '       d[   VP                  VP                  R^4      P                  R 4      ;'       g    RpVP                  WPVP                  VP                   3# Vf8   Ve   \1        R	4      hVP3                  R ^4      w  reV'       g   R pR
RRrpWeWxV	3# RpVP                  R 4      P/                  R 4      pV'       d)   V^ ,          R8X  d   RR P5                  VR,          4      pp\        \        WVR7      4      P                  R 4      VP                  R 4      ;'       g    RT ;'       g    RRR3# )r   )r   r   r   r   NTc                &    \        V ^ ,          4      #     r=   xs   &r)   rI  -_read_channel_configuration.<locals>.<lambda>-  s    cRSTURVir,   )reversekeyrQ   c                &    \        V ^ ,          4      # rY  r[  r\  s   &r)   rI  r^  F  s    S1Yr,   z1Port should not be set if host is not set either.fileconda:r4   NN)rstripr`   r   sortedr
   migrated_custom_channelsr   r   rL  r   r   r   ru   rL   rI   rK   rM   r   rz   r   r   r<   r   r   r   r   join)rI   rV  r   r   r   r<   rL   _scheme_auth_tokensubnamerc   r   migrated_aliasr   that_test_urlbump
path_partss   &&&&              r)   _read_channel_configurationrp    s   
 $$DKK$D3d;<H T-.55c:NNd
 	
 !((..0$DW ,C8+L(5)(HX4LMM&&x'?QGMMcRG#D2L+L9G   $ "::~6677##N$;$;RCII#ND&&B;;ii"((BB	 ;  %%';N !!1!17<<@s 3]5H5H5MNN&&}b!<BB3GG  w/  
		B	{{{+sR[[..s3  R399#>FF${{D"''288;; |PQQ!a0H!'twv55
 DC&&s+Jjmw.chhz"~6dCt45<<SA

34$ r,   c                    V ^8  d   QhRRRR/# rk   r'   )r(   s   "r)   r*   r*   v  s     ) ) ) )r,   c           	     >   \        \        P                  V 4      w	  ppppppppp	\        WWx4      w  p
ppppV
f   Vf   \	        R4      hV'       d   \        V4      pV'       d   \        V4      p\        T;'       g    RT;'       g    TT
T;'       g    TVVV4      # )Nz5channel_location and channel_name cannot both be Nonehttps)r   r
   r}   rp  r   r   r!   )rl   rI   rK   rM   rN   rO   rV  r   r   queryr[   rc   configured_schemeconfigured_authconfigured_tokens   &              r)   rn   rn   v  s     	#7#8#8#>
 	$F$=
 L$8PQQ %l3)*:;$$W!!! r,   c                   V ^8  d   QhRR/# )r$   r%   ztuple[PathType]r'   )r(   s   "r)   r*   r*     s     ' '? 'r,   c                 $    \         P                  3# r.   )r
   local_build_rootr'   r,   r)   get_conda_build_local_urlr{    s    $$&&r,   Nc               (    V ^8  d   QhRRRRRRRR/# )	r$   r5   zIterable[Channel | str]r   r   r   r   r%   zdict[str, tuple[str, int]]r'   )r(   s   "r)   r*   r*     s0     # #%## "#  	#r,   c                    R V  4       p / p\        V 4       FJ  w  rEVP                  W4       F0  pWc9   d   K  VP                  \        V\        ^,
          4      3W6&   K2  	  KL  	  V# )aP  Make a dictionary of channel priorities.

Maps channel names to priorities, e.g.:

.. code-block:: pycon

   >>> prioritize_channels(["conda-canary", "defaults", "conda-forge"])
   {
       'https://conda.anaconda.org/conda-canary/osx-arm64': ('conda-canary', 0),
       'https://conda.anaconda.org/conda-canary/noarch': ('conda-canary', 0),
       'https://repo.anaconda.com/pkgs/main/osx-arm64': ('defaults', 1),
       'https://repo.anaconda.com/pkgs/main/noarch': ('defaults', 1),
       'https://repo.anaconda.com/pkgs/r/osx-arm64': ('defaults', 2),
       'https://repo.anaconda.com/pkgs/r/noarch': ('defaults', 2),
       'https://conda.anaconda.org/conda-forge/osx-arm64': ('conda-forge', 3),
       'https://conda.anaconda.org/conda-forge/noarch': ('conda-forge', 3),
   }

Compare with ``conda.resolve.Resolve._make_channel_priorities``.
c              3  \   "   T F"  p\        V4      P                   F  q"x  K  	  K$  	  R # 5ir.   )r!   r5   )r7   r<   r   s   &  r)   r:   &prioritize_channels.<locals>.<genexpr>  s#     SHDGDM<R<R<RHs   *,)	enumerater   r   minr   )r5   r   r   resultpriority_counterr   rl   s   &&&    r)   prioritize_channelsr    sm    2 THSHF%.x%8!<< 0:C}&&$&:Q&>?FK ; &9 Mr,   c               (    V ^8  d   QhRRRRRRRR/# )	r$   r5   zIterable[str | Channel]r   r   r   r   r%   r   r'   )r(   s   "r)   r*   r*     s0     	! 	!%	!!	! 	! 		!r,   c                    . pV  F.  p\        V4      pVP                  VP                  W!4      4       K0  	  \        \	        V4      4      # r.   )r!   r   r   r?   r   )r5   r   r   r  chnr   s   &&&   r)   all_channel_urlsr    sC    
 F#,gll#3=>    r,   c                    V ^8  d   QhRRRR/# )r$   rl   r   r%   r   r'   )r(   s   "r)   r*   r*     s     N Nc Nd Nr,   c                    \         P                  '       * ;'       g*    \        V 4      '       * ;'       g    V P                  R 4      # )zfile:/)r
   offliner   rz   ro   s   &r)   offline_keepr    s.    MMfSk/MMS^^H5MMr,   c                    V ^8  d   QhRRRR/# )r$   ctxr   r%   r   r'   )r(   s   "r)   r*   r*     s     7 7' 7&9 7r,   c                    \         ;QJ d    . R V P                   4       F  NK  	  5# ! R V P                   4       4      # )z*Return current channels as Channel objectsc              3  8   "   T F  p\        V4      x  K  	  R # 5ir.   )r!   )r7   r  s   & r)   r:   #get_channel_objs.<locals>.<genexpr>  s     6#r.  r/  )r  s   &r)   get_channel_objsr    s,    5665656666r,   z26.9z27.3ChannelTypez`Channel` no longer uses a metaclass; single-arg construction and `MultiChannel` dispatch moved to `Channel.__new__`. Use `type(Channel)` (i.e. the builtin `type`) if you need the metaclass.)addendum)TN)NT)=r  
__future__r   r   	functoolsr   loggingr   typingr   base.constantsr   r   r	   base.contextr
   common.compatr   r   common.iteratorsr   common.pathr   r   
common.urlr   r   r   r   r   r   r   r   r   r   deprecationsr   collections.abcr   r   r   r   r   r  r   r!   r@   r   rL  ru   rp  rn   r{  r  r  r  r  register_reset_callabackr1   constanttyper'   r,   r)   <module>r     s    #      
 # 8 % 3   &2&& f
 f
RB
7 B
JM
BZz)Z'#L	!N7
     !5!5 6   

M	S
r,   