
    sia                      % S r SSKJr  SSKrSSKrSSKrSSK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Jr  SSKJr  SSKJr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$  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K0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9  SSK:J;r;  SSK<J=r=J>r>  SSK?J@r@JArAJBrB  SSKCJDrDJErEJFrF  SSKGJHrH  SSKIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQJRrRJSrSJTrTJUrUJVrVJWrWJXrXJYrYJZrZJ[r[J\r\J]r]J^r^J_r_J`r`JaraJbrbJcrcJdrdJereJfrfJgrg  \(       a>  SSKhJiri  SSKjJkrkJlrl  SSKJmrmJnrn  SS K0JoroJprp  SS!K?JqrqJrrr  SS"KsJtrt  SS#KuJvrv  SS$KwJxrx  SS%KyJzrz   \R                  " 5         \GR                   " \5      rS&S'S'S(S)S*S+.r1 S,krS-S.S/.r\" \" S0\1 35      5      rS1\S2'   \" \R                  \15      rS1\S3'       SZ         S[S4 jjq        S\S5 jrS]S6 jrS^S7 jrS]S8 jrS_S9 jrS]S: jr " S; S<\25      r\`S4     S`S= jjr\
S\`S4       SaS> jj5       r " S? S@5      r " SA SB5      r\" 5       r\`S4       SbSC jjr Sc     SdSD jjrS\`S4       SeSE jjr  Sf     SgSF jjr\rShSG jrScSiSH jjrSjSI jr\H" SJSKSLSM9 Sk       SlSN jj5       rScSmSO jjr\H" SJSKSPSM9SnSQ j5       r\H" SJSKSRSM9    SoSS j5       r\H" SJSKSTSM9 Sp       SqSV jj5       r\H" SJSKSWSM9SrSX j5       r \" SUS5      qg! \| a8  r}\}R                  \:X  a"  \R                  " \R                  5         Sr}C}GNe Sr}C}ff = f! \3 a5  r}\" \" \}5      \GRN                  SY9  \GRP                  " S5         Sr}C}gSr}C}ff = f)szConda's global configuration object.

The context aggregates all configuration files, environment variables, and command line arguments
into one global stateful object to be used across all of conda.
    )annotationsN)contextmanagersuppress)ENOENT)cachecached_property)chain)abspathexists
expanduserisdirisfilejoin)split)Path)TYPE_CHECKING)
frozendict   )CONDA_SOURCE_ROOT__version__)memoizedproperty)dalslinux_get_libc_version)mac_ver)NoneTypeon_win)	DEFAULT_CONDARC_FILENAMEConfigurationConfigurationLoadErrorMapParameterParameterLoaderPrimitiveParameterSequenceParameterValidationErrorYamlRawParameter)TRACE)groupby_to_dictunique)BIN_DIRECTORYexpandpaths_equal)
has_schemepath_to_urlsplit_scheme_auth_token)
deprecated   )APP_NAMECMD_LINE_SOURCECONDA_LIST_FIELDS"DEFAULT_AGGRESSIVE_UPDATE_PACKAGESDEFAULT_CHANNEL_ALIASDEFAULT_CHANNELSDEFAULT_CHANNELS_UNIXDEFAULT_CHANNELS_WINDEFAULT_CONDA_LIST_FIELDS DEFAULT_CONSOLE_REPORTER_BACKENDDEFAULT_CUSTOM_CHANNELSDEFAULT_JSON_REPORTER_BACKENDDEFAULT_SOLVERDEFAULTS_CHANNEL_NAMEENV_VARS_SOURCEKNOWN_SUBDIRS
NO_PLUGINSPREFIX_MAGIC_FILEPREFIX_NAME_DISALLOWED_CHARSREPODATA_FNRESERVED_ENV_NAMESROOT_ENV_NAMESEARCH_PATHUNKNOWN_CHANNELChannelPriorityDepsModifierPathConflictSafetyChecksSatSolverChoiceUpdateModifier)	Namespace)IterableIterator)AnyLiteral)	ParameterRawParameter)	PathsTypePathTypeChannel	MatchSpecPluginConfig)CondaPluginManagerfreebsdlinuxosxwinzos)	freebsd13linux2rb   darwinwin32re   >   arm64ppc64s390xarmv6larmv7laarch64ppc64leriscv64x86x86_64)    @   z~/rY   user_rc_pathsys_rc_pathc                "    SSK Jq  [        XX#S9$ )Nr   )user_data_dir)	appauthorversionroaming)platformdirsry   )appnamerz   r{   r|   s       2lib/python3.13/site-packages/conda/base/context.pyry   ry      s     +wXX    c                :   U (       a  [        US5      [        SSS5      /nO[        SSS5      [        US5      /n[        (       a-  UR                  [        [        [        [        5      S5      5        [        [        R                  S / UQUQ7 5       5      5      $ )Nenvs~.condac              3  8   #    U  H  n[        U5      v   M     g 7fNr,   .0paths     r   	<genexpr>-mockable_context_envs_dirs.<locals>.<genexpr>   s     S8Rvd||8R   )r   r   appendry   r3   tupledictfromkeys)root_writableroot_prefix
_envs_dirs
fixed_dirss       r   mockable_context_envs_dirsr      s     f%h'

 h'f%

 v$}Xx@&IJS8R*8Rz8RSSTTr   c                >    U (       a  [        U 5      (       d  SU  S3$ g)Nzchannel_alias value 'z' must have scheme/protocol.T)r.   values    r   channel_alias_validationr      s"    Z&&&ug-IJJr   c                 X    [         R                  n SU R                  U R                  4-  $ )Nz%d.%d)sysversion_infomajorminor)vers    r   default_python_defaultr      s%    


Ccii+++r   c                    U (       a7  [        U 5      S:  a'  U S   S:X  a   [        U 5      n SU s=::  a  S:  a   g  OOOgSU  S3$ ! [         a     Nf = f)	N   r2   .g       @g      @Tzdefault_python value 'z*' not of the form '[23].[0-9][0-9]?' or '')lenfloat
ValueErrorr   s    r   default_python_validationr      sg    u:?uQx3e%%#% & #E7*TUU  s   A A 
AAc                    [        U 5      R                  [        5      =n(       a  S[        U5       S[        [        5       3$ g)NzInvalid value(s): z. Valid values are: T)set
differencer5   sorted)r   invalids     r   list_fields_validationr      sI    e*''(9::w:  1 2!!'(9!: ;=	
 r   c                    [        U [        5      (       a7  [        R                  S:  a  U S:X  a  gU S:w  a  [	        U 5      (       d  SU  S3$ g)N)r   
   
truststorezB`ssl_verify: truststore` is only supported on Python 3.10 or laterzssl_verify value 'z' must be a boolean, a path to a certificate bundle file, a path to a directory containing certificates of trusted CAs, or 'truststore' to use the operating system certificate store.T)
isinstancestrr   r   r   r   s    r   ssl_verify_validationr      sR    %g%%<*?Wl"6%==$UG ,6 6 r   c                  "  ^  \ rS rSr\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r	\" \" S5      SS9r
\" \" S5      SS9r\" \" \5      SS9r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" S	5      5      r\" \" S
\\4S9SS9r\" \" \" S\S95      SS9r\" \" S5      5      r\" \" S5      5      r\" \" \" 5       \\4\S95      r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r \" \" S5      SS9r!\"\#" SSSS9S 5       5       r$\" \" S\%S9SS9r&\" \" S\%S9SS9r'\" \" S\%S9SS9r(\" \" S\%S9SS9r)\" \" S\%S9SS9r*\" \" \" S\S9\+5      SS9r,\" \" \-R\                  5      5      r/\" \" S5      5      r0\" \" S
\\4S9SS9r1\" \" \2R                   5      5      r3\" \" \" S\S9SS95      r4\" \" \" S\S9SS9SS9r5\" \" S5      5      r6\" \" \" S\S95      5      r7\" \" S5      5      r8\" \" S5      5      r9\" \" S5      S S9r:\" \" \" S\S9\;Rx                  S9S!SS"9r=\" \" \" S\5      5      S#SS"9r>\" \" S5      S$S9r?\" \" \" S\5      5      S%S9r@\" \" \" S\5      5      S&S9rA\" \" S'\B\%4S95      rC\" \" S\\B4\DS9S(SS"9rE\" \" S
\\4S9S)SS"9rF\" \" S
\\4S9S*SS"9rG\" \H" \" S
\\45      5      SS+9rI\" \" S,5      5      rJ\" \" S-5      5      rK\" \" S.5      5      rL\" \" S'5      5      rM\" \" S5      S/S9rN\" \" S5      5      rO\" \" \P\QS09S1SS"9rR\" \" \SR                  5      5      rU\" \" \" S\S9S2S39S4SS"9rV\" \" \H" \" S\S95      5      5      rW\" \H" \" S\S9\X5      S5SS"9rY\" \H" \" \" S\S95      5      S6SS"9rZ\" \" \" S\S9\[5      S7SS"9r\\" \" \" S\S95      S8S9r]\" \H" \" S\S95      SS+9r^\" \" S5      5      r_\" \" S
\B\4S95      r`\" \" S5      5      ra\" \" \" S\S95      S9SS"9rb\" \" \" S\S95      SS+9rc\" \" \" S\S9S:\d45      5      re\" \" S
\B\4S9S;S9rf\" \" S5      S<S9rg\" \" S5      S=S9rh\" \" S
\B\4S9S>S9ri\" \" S5      S?/S9rj\" \" S5      S@/S9rk\" \" S5      5      rl\" \" S5      5      rm\" \" SA5      SBS9rn\" \" S5      5      ro\" \" S5      5      rp\" \" \q\S9SC/S9rr\" \" \" S\S9\s\tSD95      ru\" \" S5      5      rv\" \" S5      5      rw\" \" S5      5      rx\" \" S
\B\4S9SES9ry\" \" S5      5      rz\" \" SF\%S95      r{\" \" S5      5      rz\" \" \" S\S95      SS+9r|\" \" S\%S9SGS9r}\" \" \" S\5      5      5      r~\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" \GR                  5      5      r\" \" \GR                  5      5      r\" \" \GR                  5      5      r\" \" S5      5      r\" \" \5      SHS9r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" S5      5      r\" \" SI5      5      r\" \" S5      5      r\" \" S
\B\4S9SJS9r\" \" S5      SKS9r\" \H" \" S\S95      SLS9r\" \H" \" S
\\4S95      SMS9r\" \" \5      5      r  S   SU 4SN jjjrSSO jr\"SSP j5       r\SSQ j5       r\"\#" SRSS5      SST j5       5       r\"\#" SRSS5      SSU j5       5       r\"SSV j5       r\"SSW j5       r\"SSX j5       r\"SSY j5       r\"SSZ j5       r\"SS[ j5       r\"SS\ j5       r\"SS] j5       r\"SS^ j5       r\"SS_ j5       r\"SS` j5       r\"SSa j5       r\"SSb j5       r\SSc j5       r\"SSd j5       r\SSe j5       r\"SSf j5       r\"SSg j5       r\"SSh j5       r\"SSi j5       r\"SSj j5       r\SSk j5       r\"SSl j5       r\"SSm j5       r\"SSn j5       r\"SSo j5       r\"SSp j5       r\SSq j5       r\"SSr j5       r\"\#" SsSStS9SSu j5       5       r\"SSv j5       r\"SSw j5       r\"SSx j5       r\SSy j5       r\"SSz j5       r\"SS{ j5       r\SS| j5       r\SS} j5       r\SS~ j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       rSS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r\"SS j5       r\"\#" SSSS9SS j5       5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       r\"SS j5       rSS jr\SS j5       rSrU =r$ )Context   TF)self_update)aliases)auto_activate_base)default_activation_envr   z({default_env}) N)element_type)env_spec )create_default_packages)r   
validation)pip_interop_enabled25.926.3z+Use 'Context.prefix_data_interoperability'.addendumc                    U R                   $ r   )prefix_data_interoperabilityselfs    r   r   Context.pip_interop_enabled  s     000r   )default_threads)repodata_threads)fetch_threads)verify_threads)execute_threads)aggressive_update_packages)signing_metadata_url_base&)string_delimiter)disallow)root_dirr   )	envs_dirs	envs_path)r   
expandvars)	pkgs_dirs)subdir)subdirs)export_platformsextra_platformsr2   )
verify_ssl)client_cert)client_cert_key)r   gL"@g      N@r   )add_binstar_token)r   )channel_alias )default)channelschannel)custom_channels)custom_multichannels)default_channels)migrated_channel_aliases)whitelist_channelszcurrent_repodata.json)use_only_tar_bz2)softlink)copy)yesdebugtracez,https://conda.io/conda-post/unexpected-error)error_upload_urlconsole)r   r   )report_errors   )verbose	verbosity)experimental_solverr   )binstar_uploadcroot)zconda-buildconda_build)virtual_packagesoverride_virtual_packagesc                   > [         TU ]  US9  U R                  Uc  [        OU[	        X5      S9  U R                  [        5        U R                  U5        g )N)argparse_args)CONDA_PREFIX)super__init___set_search_pathrI   determine_target_prefix_set_env_varsr3   _set_argparse_args)r   search_pathr   kwargs	__class__s       r   r  Context.__init__'  sX     	}5&.KK0E 	 	

 	8$.r   c                6   / nU R                   (       a:  U R                  (       d)  [        SU R                  SS5      nUR                  U5        U R                  (       a:  U R
                  (       a)  [        SU R                  SS5      nUR                  U5        U$ )Nclient_ssl_certz
<<merged>>zC'client_ssl_cert' is required when 'client_ssl_cert_key' is definedalways_copyzZ'always_copy' and 'always_softlink' are mutually exclusive. Only one can be set to 'True'.)client_ssl_cert_keyr  r&   r   r  always_softlink)r   errorserrors      r   post_build_validationContext.post_build_validation7  s    ##D,@,@#!$$U	E MM%  4 4#  1	E MM% r   c                    SSK Jn  U" 5       $ )z
This is the preferred way of accessing the ``PluginManager`` object for this application
and is located here to avoid problems with cyclical imports elsewhere in the code.
r   )get_plugin_manager)plugins.managerr  )r   r  s     r   plugin_managerContext.plugin_managerL  s     	9!##r   c                    U R                   R                  5         U R                   R                  U R                  5      $ )zL
Preferred way of accessing settings introduced by the settings plugin hook
)r  load_settings
get_configraw_datar   s    r   pluginsContext.pluginsV  s1    
 	))+""--dmm<<r   z26.9z27.3c                    U R                   $ r   )_error_upload_urlr   s    r   r   Context.error_upload_url^  s     %%%r   c                    U R                   $ r   )_report_errorsr   s    r   r   Context.report_errorsf  s     """r   c                    [        [        S S U R                  U R                  U R                  R                  S5      [        U R                  S5      S4 5        5       5      5      $ )Nc              3  J   #    U  H  n[        U5      (       d  M  Uv   M     g 7fr   )r   )r   	full_paths     r   r   2Context.conda_build_local_paths.<locals>.<genexpr>r  s'      
"I # 	
"   #	#c              3  J   #    U  H  nU(       d  M  [        U5      v   M     g 7fr   r   )r   ds     r   r   r)  t  s(      
"  F1IIs   ##root-dir	conda-bld~/conda-bld)r   r*   _crootbld_pathr   getr   r   r   s    r   conda_build_local_pathsContext.conda_build_local_pathsn  si      
" ((,,Z8T--{;%
" 
 	
r   c                :    [        S U R                   5       5      $ )Nc              3  8   #    U  H  n[        U5      v   M     g 7fr   )r/   r   ps     r   r   1Context.conda_build_local_urls.<locals>.<genexpr>  s     J-I[^^-Ir   )r   r3  r   s    r   conda_build_local_urlsContext.conda_build_local_urls  s    JT-I-IJJJr   c                   U R                   (       a  [        [        U R                   5      5      $ U R                  (       a  [        [        U R                  5      5      $ SU R                  ;   a!  [        [        U R                  S   5      5      $ U R
                  (       a  [        U R                  S5      $ [        S5      $ )z1This is where source caches and work folders liver-  r.  r/  )	r0  r
   r   r1  r   r   r   r   r,   r   s    r   r   Context.croot  s     ;;:dkk233]]:dmm4554+++:d&6&6z&BCDD((+66-((r   c                    U R                   $ r   r   r   s    r   local_build_rootContext.local_build_root  s    zzr   c                x     U R                   $ ! [         a!    [        U R                  5      =U l         nUs $ f = fr   )_Context__conda_buildAttributeErrorr   _conda_build)r   rB  s     r   r   Context.conda_build  s@    	!%%% 	!15d6G6G1HHD  	!s    (99c                j    [         R                  " 5       nU[        ;   a  U$ [        U R                     $ r   )platformmachinenon_x86_machines_arch_namesbitsr   ms     r   	arch_nameContext.arch_name  s-      Htyy))r   c                J    [         R                  [        R                  S5      $ )Nunknown)_platform_mapr2  r   rG  r   s    r   rG  Context.platform  s      y99r   c                ,    U R                   =(       d    S $ r   )_default_threadsr   s    r   r   Context.default_threads  s    $$,,r   c                @    U R                   =(       d    U R                  $ r   )_repodata_threadsr   r   s    r   r   Context.repodata_threads  s    %%=)=)==r   c                    U R                   S:X  a  U R                  S:X  a  gU R                   =(       d    U R                  $ )zL
If both are not overriden (0), return experimentally-determined value of 5
r   r   )_fetch_threadsrU  r   r   s    r   r   Context.fetch_threads  s9    
 !#(=(=(B"":d&:&::r   c                    U R                   (       a  U R                   nU$ U R                  (       a  U R                  nU$ SnU$ Nr2   )_verify_threadsr   r   threadss     r   r   Context.verify_threads  sF    **G
 	 !!**G  Gr   c                    U R                   (       a  U R                   nU$ U R                  (       a  U R                  nU$ SnU$ r^  )_execute_threadsr   r`  s     r   r   Context.execute_threads  sF      ++G
 	 !!**G  Gr   c                \    U R                   (       a  U R                   $ U R                  5       $ r   )_subdir_native_subdirr   s    r   r   Context.subdir  s"    <<<<""$$r   c                    [         R                  " 5       nU[        ;   a  U R                    SU 3$ U R                   S:X  a  gSU R                   U R                  4-  $ )N-re   zzos-zz%s-%d)rG  rH  rI  rK  rL  s     r   rh  Context._native_subdir  sU      mm_AaS))]]e#dmmTYY777r   c                D    U R                   =(       d    U R                  S4$ )Nnoarch)_subdirsr   r   s    r   r   Context.subdirs  s    }}7h 77r   c                >    [        / [        QU R                  Q75      $ r   )	frozensetrB   r   r   s    r   known_subdirsContext.known_subdirs  s    8=84<<899r   c                
   [        [        U S0 5      =(       d    0 5      nUR                  S5      (       a  UR                  S5      =(       d    SnOU R                  n[	        [        U5      5      =(       d    U R                  4$ )N_argparse_argsoverride_platformsr   r   )r   getattrr2  _export_platformsr   r*   r   )r   r   	platformss      r   r   Context.export_platforms  sm     WT+;R@FBG122%))*<=CI..I VI&'9DKK>9r   c                X    U R                   (       a  gS[        R                  " S5      -  $ )Nrt      P)force_32bitstructcalcsizer   s    r   rK  Context.bits  s"    vs+++r   c                    [        U R                  [        5      n[        U5      (       a   [	        US5      nUR                  5         gg! [         a  n[        R                  U5         S nAgS nAff = f)Nza+TF)	r   r   rD   r   opencloseOSErrorlogr   )r   r   fhes       r   r   Context.root_writable  sb     D$$&78$<<$%
 
  		!s   A
 

A3A..A3c                X    [        U R                  U R                  U R                  5      $ r   )r   r   r   r   r   s    r   r   Context.envs_dirs  s&    ) 0 0$//
 	
r   c                |  ^ U R                   (       a/  [        [        R                  S U R                    5       5      5      $ [        R
                  (       a  SOSmU R                  [        SS5      4n[        (       a  U[        [        [        5      4-  n[        [        R                  U4S jU 5       5      5      $ )Nc              3  8   #    U  H  n[        U5      v   M     g 7fr   r   r7  s     r   r   $Context.pkgs_dirs.<locals>.<genexpr>  s     &J/Qvayy/r   pkgs32pkgsr   r   c              3  N   >#    U  H  n[        [        UT5      5      v   M     g 7fr   )r,   r   )r   r8  cache_dir_names     r   r   r  !  s      T
!fT!^%<==
s   "%)
_pkgs_dirsr   r   r   contextr  r   r   r   ry   r3   )r   r   r  s     @r   r   Context.pkgs_dirs  s    ??&J$//&JJKK)0)<)<X&N  S(#J v}Xx@BB
T
TT r   c                z    SSK Jn  UR                  5       R                  n[	        US5      nSSKJn  U" U5        U$ )Nr   )PackageCacheDataz.trash)mkdir_p)core.package_cache_datar  first_writablepkgs_dirr   gateways.disk.creater  )r   r  r  	trash_dirr  s        r   r  Context.trash_dir$  s8     	?#224==8,	2	r   c                p   U R                   (       a  U R                   $ [        R                  " S5      nUS /[        Q7;   a  U R                  $ [        R
                  U;   a  [        U5      $ U R                   H"  n[        X!5      n[        U5      (       d  M   Us  $    [        U R                  S   U5      $ )NCONDA_DEFAULT_ENVr   )
active_prefixosgetenvrG   r   sepr
   r   r   r   )r   _default_envenvs_dirdefault_prefixs       r   r  Context.default_prefix0  s    %%%yy!45D6#566###VV|#<(( NN!%h!=(()) + DNN1%|44r   c                .    [         R                  " S5      $ )Nr  )r  r  r   s    r   r  Context.active_prefix@  s    yy((r   c                B    [        [        R                  " SS5      5      $ )NCONDA_SHLVL)intr  r  r   s    r   shlvlContext.shlvlD  s    299]B/00r   c                N   ^ SSK Jm  [        U4S jU R                   5       5      $ )Nr   r\   c              3  4   >#    U  H  nT" U5      v   M     g 7fr   r   )r   sr]   s     r   r   5Context.aggressive_update_packages.<locals>.<genexpr>L  s     L+KaYq\\+Ks   )models.match_specr]   r   _aggressive_update_packages)r   r]   s    @r   r   "Context.aggressive_update_packagesH  s    1L4+K+KLLLr   c                    [        U 5      $ r   )r  r   s    r   target_prefixContext.target_prefixN  s     't,,r   c                x    U R                   (       a  [        [        U R                   5      5      $ U R                  $ r   )_root_prefixr
   r   conda_prefixr   s    r   r   Context.root_prefixT  s-    :d&7&7899$$$r   c                4    [        [        R                  5      $ r   )r
   r   prefixr   s    r   r  Context.conda_prefix[  s    szz""r   z23.9zCPlease use `conda.base.context.context.conda_exe_vars_dict` insteadc                V    [         (       a  SOSn[        U R                  [        U5      $ )N	conda.execonda)r   r   r  r+   )r   exes     r   	conda_exeContext.conda_exe_  s$     $VkD%%}c::r   c                0    [        U R                  SS5      $ )zSWhere critical artifact verification data (e.g., various public keys) can be found.etcr  )r   r  r   s    r   av_data_dirContext.av_data_diri  s     D%%ug66r   c                >    U R                   (       a  U R                   $ g)zPBase URL for artifact verification signing metadata (*.root.json, key_mgr.json).N)_signing_metadata_url_baser   s    r   r   !Context.signing_metadata_url_baseo  s     **222r   c                   [         R                  (       a  [        R                  R	                  SS5      =n(       a&  [        R
                  R                  [        U45      nO[        n[        R                  [        R                  USS[        R                  U R                  S.$ [        R                  R                  U R                  [        [        (       a  SOS5      nUUSS[        R                  U R                  S.$ )	z_
The vars can refer to each other if necessary since the dict is ordered.
None means unset it.

PYTHONPATHr   z-mr  )	CONDA_EXE
_CONDA_EXEr  _CE_M	_CE_CONDACONDA_PYTHON_EXE_CONDA_ROOTr  N)r  r  r  r  r  r  )r  devr  environr2  pathsepr   r   r   
executabler  r   r+   r   )r   
pythonpathr  s      r   conda_exe_vars_dictContext.conda_exe_vars_dictw  s     ;;ZZ^^L"==z=ZZ__.?-LM
.
 ^^!nn($$'NN#00	 	 '',,!!%v7C !!!$'NN#00 r   c                L    SSK Jn  [        U R                  5      u  p#pEU" X4X%S9$ )Nr   rZ   schemeauthlocationtoken)models.channelr[   r0   _channel_alias)r   r[   r  r  r  r  s         r   r   Context.channel_alias  s'    ,(?@S@S(T%$f(PPr   c                \   ^ SSK Jm  [        U4S jS U R                   5        5       5      $ )Nr   rZ   c              3  8   >#    U  H  u  pp4T" X#XS 9v   M     g7f)r  Nr   )r   r  r  r  r  r[   s        r   r   3Context.migrated_channel_aliases.<locals>.<genexpr>  s(      
2-$ 6xM2s   c              3  8   #    U  H  n[        U5      v   M     g 7fr   )r0   )r   cs     r   r   r    s      24Rq'**4Rr   )r  r[   r   _migrated_channel_aliases)r   r[   s    @r   r    Context.migrated_channel_aliases  s0    , 
2484R4R2
 
 	
r   c                    U R                   R                  S5      S L=(       d    U R                   R                  S5      S L$ )Nr  name)rv  r2  r   s    r   prefix_specifiedContext.prefix_specified  s@     ##H-T9 ;""&&v.d:	
r   c                (    U R                   [           $ r   )r   r@   r   s    r   r   Context.default_channels  s    
 (()>??r   c           	       ^ ^ SSK Jm  [        (       dD  T R                  R	                  S5      (       a$  T R
                  [        :X  a  [        [        5      nO[        T R
                  5      n[        U0T R                  EST R                  0ER                  5        VVs0 s H  u  p#U[        UU 4S jU 5       5      _M     snn$ s  snnf )Nr   rZ   zwin-localc              3  ^   >#    U  H"  nTR                   " TR                  U5      v   M$     g 7fr   make_simple_channelr   )r   urlr[   r   s     r   r   /Context.custom_multichannels.<locals>.<genexpr>  s+      PT++D,>,>DDPTs   *-)r  r[   r   r   
startswith_default_channelsr9   listr:   r@   _custom_multichannelsr:  itemsr   )r   r   r  urlsr[   s   `   @r   r   Context.custom_multichannels  s    , &&v..&&*??#$89#D$:$:; &'7 ,, 44	
 eg	


 % PT  	

 
	
 

s    #Cc                  ^ ^ SSK Jm  / [        R                  " S T R                  R                  5        5       5      QUU 4S jT R                  R                  5        5       Q7 Vs0 s H  nUR                  U_M     sn$ s  snf )Nr   rZ   c              3  $   #    U  H  ov   M     g 7fr   r   )r   r   s     r   r   *Context.custom_channels.<locals>.<genexpr>  s      %+MG+Ms   c              3  b   >#    U  H$  u  pTR                   " TR                  X!5      v   M&     g 7fr   r  )r   r  r  r[   r   s      r   r   r    s0      %B	 //0B0BCNN%Bs   ,/)	r  r[   r	   from_iterabler   values_custom_channelsr   r  )r   r   r[   s   ` @r   r   Context.custom_channels  s    ,$$ %+/+D+D+K+K+M% %)%:%:%@%@%B	
 LL'!
 	
 
s   (Bc                   U R                   (       a  SOSn[        [        U S0 5      =(       d    0 5      nUR                  S5      =(       d    SnUR                  S5      (       aD  U R                  (       d  SSKJn  U" S5      eU(       a  [        / UQUQ75      $ SS	KJn  U" S
5      e[        / UQU R                  Q75      $ )N)r  r   rv  r   override_channelsr   )OperationNotAllowedz&Overriding channels has been disabled.ArgumentErrorzQAt least one -c / --channel flag must be supplied when using --override-channels.)
	use_localr   rx  r2  override_channels_enabled
exceptionsr  validate_channelsr  	_channels)r   local_channelsr   cli_channelsr  r  s         r   r   Context.channels  s    '+~~2WT+;R@FBG$((39r01111<)*RSS()I>)IL)IJJ6#+ 
 !!C>!CDNN!CDDr   c                J    [        S [        R                  5        5       5      $ )Nc              3  J   #    U  H  nU[         [        4;  d  M  Uv   M     g 7fr   )rA   r4   r   s     r   r   'Context.config_files.<locals>.<genexpr>   s&      
-O_== D-r*  )r   r  collect_allr   s    r   config_filesContext.config_files  s%     
++-
 
 	
r   c                f    SS K nUR                  R                  (       + =(       d    U R                  $ )Nr   )conda_package_handling.apiapilibarchive_enabled_use_only_tar_bz2)r   conda_package_handlings     r   r   Context.use_only_tar_bz2  s.     	* '**===$##	$r   c                    U R                   $ r   )anaconda_uploadr   s    r   r   Context.binstar_upload  s     ###r   c                     U R                   S:  $ )z Alias for context.verbosity >=4.   r   r   s    r   r   Context.trace       ~~""r   c                     U R                   S:  $ )z Alias for context.verbosity >=3.r   r*  r   s    r   r   Context.debug  r,  r   c                     U R                   S:  $ )z Alias for context.verbosity >=2.r   r*  r   s    r   infoContext.info  r,  r   c                     U R                   S:  $ )z Alias for context.verbosity >=1.r2   r*  r   s    r   r   Context.verbose$  r,  r   c                b    U R                   (       a  gU R                  (       a  gU R                  $ )zVerbosity level.

For cleaner and readable code it is preferable to use the following alias properties:
    context.trace
    context.debug
    context.info
    context.verbose
    context.log_level
r)  r   )_trace_debug
_verbosityr   s    r   r   Context.verbosity)  s"      ;;[[??"r   c                d   SU R                   :  a  [        R                  $ SU R                   s=:  a  S::  a   [        $   SU R                   s=:  a  S::  a   [        R                  $   SU R                   s=:  a  S::  a"   [        R
                  $   [        R                  $ [        R                  $ )z'Map context.verbosity to logging level.r)  r   r   r2   )r   loggingNOTSETr(   DEBUGINFOWARNINGr   s    r   	log_levelContext.log_level@  s     t~~>>!$1$L %$1$==  %$1$<< % ??"7??"r   c                    U R                   R                  5        VVs0 s H  u  pUR                  S5      U_M     snn$ s  snnf )z3Remove any dunders in the virtual_package name keys__)_override_virtual_packagesr   removeprefix)r   r  r   s      r   r   !Context.override_virtual_packagesN  sJ    
  $>>DDF
F d#U*F
 	
 
s   A c                    SU R                    3n U R                  R                  5       nUSUR                  5        3-  nU$ ! [         a*  n[
        R                  SU R                   US9   S nAU$ S nAff = f)Nzsolver/ z7User agent could not be fetched from solver class '%s'.exc_info)solverr  get_cached_solver_backend
user_agent	Exceptionr  r   )r   rL  solver_backendexcs       r   solver_user_agentContext.solver_user_agentV  s    t{{m,
		!00JJLNAn779:;;J   	III  
 	s   0A 
A7A22A7c                   S[          SU R                   3/nUR                  SR                  " U R                  6 5        UR                  SR                  " U R
                  6 5        UR                  SR                  " U R                  6 5        U R                  S   (       a(  UR                  SR                  " U R                  6 5        U R                  S:w  a  UR                  U R                  5       5        SR                  U5      $ )Nzconda/z
 requests/z{}/{}r   classicrG  )CONDA_VERSIONrequests_versionr   format"python_implementation_name_versionplatform_system_releaseos_distribution_name_versionlibc_family_versionrJ  rP  r   )r   builders     r   rL  Context.user_agentd  s    M?*T5J5J4KLMw~~t'N'NOPw~~t'C'CDEw~~t'H'HIJ##A&NN7>>4+C+CDE;;)#NN41134xx  r   c              #  ~   #    [        X5      n[        XU5         Sv   [        XU5        g! [        XU5        f = f7f)a  
TODO: This might be broken in some ways. Unsure what happens if the `old`
value is a property and gets set to a new value. Or if the new value
overrides the validation logic on the underlying ParameterLoader instance.

Investigate and implement in a safer way.
N)rx  setattr)r   keyr   olds       r   	_overrideContext._overridep  s7      d 5!	$Ds#GDs#s   =, =:=c                     SSK Jn  U$ ! [         a#  n[        R	                  SU5        Sn S nAU$ S nAf[
         a#  n[        R	                  SU5        Sn S nAU$ S nAff = f)Nr   r   zUnable to import requests: %srQ  zError importing requests: %s)requestsr   ImportErrorr  r  rM  )r   rU  errs      r   rU  Context.requests_version  sg    	)@    	)II5s;(    	)II4c:(	)s   
 
A"2A"AA"c                V    [         R                  " 5       [         R                  " 5       4$ r   )rG  python_implementationpython_versionr   s    r   rW  *Context.python_implementation_name_version  s!     --/1H1H1JJJr   c                V    [         R                  " 5       [         R                  " 5       4$ r   )rG  systemreleaser   s    r   rX  Context.platform_system_release  s      ("2"2"444r   c                F   U R                   S   nUS:X  a0   SS KnUR                  5       UR                  SS94nUS   US   peXV4$ US	:X  a  S
n[        5       nXV4$ Un[        R                  " 5       nXV4$ ! [         a!  n[
        R                  SUSS9  Sn S nANaS nAff = f)Nr   LinuxT)bestz%rrH  )rq  rQ  r2   DarwinOSX)	rX  distroidr{   rM  r  r   r   rG  )r   platform_nameru  distinfor  distribution_namedistribution_versions          r   rY  $Context.os_distribution_name_version  s     44Q7G#0!99;D(AA 7?qk8A;3 !66 h& %#*9  !66 !.#+#3#3#5  66  0		$D	1/0s   #A5 5
B ?BB c                     [        5       u  pX4$ r   r   )r   libc_familylibc_versions      r   rZ  Context.libc_family_version  s     %;$<!((r   c                H    U R                   (       a  [        $ U R                  $ r   )jsonr>   _consoler   s    r   r   Context.console  s    9900}}r   z=Please use `conda.base.context.context.auto_activate` insteadc                    U R                   $ r   )auto_activater   s    r   r   Context.auto_activate_base  s     !!!r   c                4    U R                   =(       d    [        $ r   )_default_activation_envrH   r   s    r   r   Context.default_activation_env  s    ++<}<r   c                   SSK Jn  [        S U R                  S9nUR	                  SS5      (       a4  [
        R                  " SU" UR	                  S5      5       S3[        5        [        UR	                  S	/ 5      5      $ )
zLReturns a list of `create_default_packages`, removing any explicit packages.r   )dashlistc                R    [         R                  R                  U 5      (       a  S$ S$ )Nexplicitspec)r  r  has_package_extension)xs    r   <lambda>1Context.create_default_packages.<locals>.<lambda>  s+    %%;;A>> ! r   )sequencer  Nz8Ignoring invalid packages in `create_default_packages`: z

Explicit package are not allowed, use package names like 'numpy' or specs like 'numpy>=1.20' instead.
Try using the command `conda config --show-sources` to verify your conda configuration.
r  )		common.ior  r)   _create_default_packagesr2  warningswarnUserWarningr   )r   r  grouped_packagess      r   r   Context.create_default_packages  s     	)* 22	
 
D11MMJ8TdThThisTtKuJv wl m  %))&"566r   c                    SSK Jn   [        [        U R                  5      5      $ ! U a    [        U R                  5      s $ f = f)zReturn the prefix of the default_activation_env.

If the default_activation_env is an environment name, get the corresponding
prefix; otherwise it is already a prefix, so just return it.

:return: Prefix of the default_activation_env
r   EnvironmentNameNotFound)r  r  r   locate_prefix_by_namer   )r   r  s     r   default_activation_prefix!Context.default_activation_prefix  sC     	9	5-d.I.IJKK& 	53344	5s   & AAc                
    / SQ$ )N)r   channel_priorityr   channel_settingsr   r   deps_modifierdisallowed_packagespinned_packagesrepodata_fns
sat_solverrJ  track_featuresupdate_modifierr   r   r   s    r   environment_context_keys Context.environment_context_keys  s    
 	
r   c                X    U R                    Vs0 s H  o[        X5      _M     sn$ s  snf )z.Returns a dict of environment related settings)r  rx  )r   r_  s     r   environment_settingsContext.environment_settings  s,     483P3PQ3PCWT''3PQQQs   'c                    SSSSSSSSS	S
SS.$ )N)r   r   r  r   r  allowlist_channelsdenylist_channelsr   r   r   migrated_custom_channelsadd_anaconda_tokenallow_non_channel_urlsr  r   r   r   experimentalno_lockrepodata_use_zst)r   r   r   )
r  r  local_repodata_ttlofflineproxy_serversremote_connect_timeout_secsremote_max_retriesremote_backoff_factorremote_read_timeout_secs
ssl_verify)
r   auto_update_condar  r   r  force_reinstallr  r   r  rJ  )allow_softlinksr  r  path_conflictrollback_enabledsafety_checksextra_safety_checksr   	shortcutsshortcuts_onlynon_admin_enabledseparate_format_cacher   r   )r1  r   r&  r   )
always_yesr  r   
auto_stack	changeps1
env_promptr  r   notify_outdated_condaquietr   show_channel_urlslist_fieldsr   unsatisfiable_hintsunsatisfiable_hints_check_depthnumber_channel_noticesenvvars_force_uppercaser   r   )
r  r  forceforce_removeclobberdry_rundownload_onlyignore_pinneduse_index_cacher  )allow_cyclesallow_conda_downgradesadd_pip_as_python_dependencyr   r   r  default_pythonenable_private_envsr   r  r   r  solver_ignore_timestampsr   r   target_prefix_overrideregister_envsprotect_frozen_envs)
no_plugins)environment_specifier)zChannel ConfigurationzBasic Conda ConfigurationzNetwork ConfigurationzSolver Configurationz.Package Linking and Install-time ConfigurationzConda-build Configurationz.Output, Prompt, and Flow Control ConfigurationzCLI-onlyzHidden and UndocumentedzPlugin ConfigurationExperimentalr   r   s    r   category_mapContext.category_map  sD    &,*
&%? *?,(2 %46MG
 G	
r   c                    U R                   $ r   )description_mapr   s    r   get_descriptionsContext.get_descriptions  s    ###r   c           
        [        S0 S[        S5      _S[        S5      _S[        S5      _S[        S5      _S	[        S
5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S 5      _S![        S"5      _S#[        S$5      _S%[        S&5      _S'[        S(5      _S)[        S*5      _S+[        S,5      _S-[        S.5      _S/[        S05      _S1[        S25      _S3[        S45      _S5[        S65      _S7[        S85      _S9[        S:5      _S;[        S<5      _S=[        S>5      _S?[        S@5      _SA[        SB5      _SC[        SD5      _SE[        SF5      _SG[        SH5      _SI[        SJ5      _SK[        SL5      _SM[        SN5      _SO[        SP5      _SQ[        SR5      _SS[        ST5      _SU[        SV5      _SW[        SX5      _SY[        SZ5      _S[[        S\5      _S][        S^5      _S_[        S`5      _Sa[        Sb5      _Sc[        Sd5      _Se[        Sf5      _Sg[        Sh5      _Si[        Sj5      _Sk[        Sl5      _Sm[        Sn5      _So[        Sp5      _Sq[        Sr5      _Ss[        St5      _Su[        Sv5      _Sw[        Sx5      _Sy[        Sz5      _S{[        S|5      _S}[        S~5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S5      _S[        S[         S35      _S[        S5      _6$ )Nr  ag  
                In conjunction with the anaconda command-line client (installed with
                `conda install anaconda-client`), and following logging into an Anaconda
                Server API site using `anaconda login`, automatically apply a matching
                private token to enable access to private packages and channels.
                r   z
                A list of packages that, if installed, are always updated to the latest possible
                version.
                r  zq
                Warn, but do not fail, when conda detects a channel url is not a valid channel.
                r  a}  
                When allow_softlinks is True, conda uses hard-links when possible, and soft-links
                (symlinks) when hard-links are not possible, such as when installing on a
                different filesystem than the one that the package cache is on. When
                allow_softlinks is False, conda still uses hard-links when possible, but when it
                is not possible, conda copies files. Individual packages can override
                this setting, specifying that certain files should never be soft-linked (see the
                no_link option in the build recipe documentation).
                r  z
                Register a preference that files be copied into a prefix during install rather
                than hard-linked.
                r  aU  
                Register a preference that files be soft-linked (symlinked) into a prefix during
                install rather than hard-linked. The link source is the 'pkgs_dir' package cache
                from where the package is being linked. WARNING: Using this option can result in
                corruption of long-lived conda environments. Package caches are *caches*, which
                means there is some churn and invalidation. With this option, the contents of
                environments can be switched out (or erased) via operations on other environments.
                r  z
                Automatically choose the 'yes' option whenever asked to proceed with a conda
                operation, such as when running `conda install`.
                r&  zg
                Automatically upload packages built with conda build to anaconda.org.
                r  z
                Automatically activate the environment given at 'default_activation_env'
                during shell initialization.
                r  zq
                Automatically update conda when a newer or higher priority version is detected.
                r  aA  
                Implicitly use --stack when using activate if current level of nesting
                (as indicated by CONDA_SHLVL environment variable) is less than or equal to
                specified value. 0 or false disables automatic stacking, 1 or true enables
                it for one level.
                r1  z
                The location where conda-build will put built packages. Same as 'croot', but
                'croot' takes precedence when both are defined. Also used in construction of the
                'local' multichannel.
                r  z
                When using activate, change the command prompt ($PS1) to include the
                activated environment.
                r   z]
                The prepended url location to associate with channel names.
                r  a,  
                Accepts values of 'strict', 'flexible', and 'disabled'. The default value
                is 'flexible'. With strict channel priority, packages in lower priority channels
                are not considered if a package with the same name appears in a higher
                priority channel. With flexible channel priority, the solver may reach into
                lower priority channels to fulfill dependencies, rather than raising an
                unsatisfiable error. With channel priority disabled, package version takes
                precedence, and the configured priority of channels is used only to break ties.
                In previous versions of conda, this parameter was configured as either True or
                False. True is now an alias to 'flexible'.
                r   z`
                The list of conda channels to include for relevant operations.
                r  z
                A list of mappings that allows overriding certain settings for a single channel.
                Each list item should include at least the "channel" key and the setting you would
                like to override.
                r  z
                A path to a single file containing a private key and certificate (e.g. .pem
                file). Alternately, use client_ssl_cert_key in conjunction with client_ssl_cert
                for individual files.
                r  zc
                Used in conjunction with client_ssl_cert for a matching key file.
                r   zS
                General configuration parameters for conda-build.
                r   ze
                Packages that are by default added to a newly created environments.
                r   z
                The location where conda-build will put built packages. Same as 'bld_path', but
                'croot' takes precedence when both are defined. Also used in construction of the
                'local' multichannel.
                r   aQ  
                A map of key-value pairs where the key is a channel name and the value is
                a channel location. Channels defined here override the default
                'channel_alias' value. The channel name (key) is not included in the channel
                location (value).  For example, to override the location of the 'conda-forge'
                channel where the url to repodata is
                https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json, add an
                entry 'conda-forge: https://anaconda-repo.dev/packages'.
                r   a+  
                A multichannel is a metachannel composed of multiple channels. The only reserved
                multichannel is 'local', which is a list of file:// channel locations where
                conda-build stashes successfully-built packages and cannot be overridden.
                Other multichannels, including 'defaults', can be defined or customized with
                custom_multichannels, where the key is the multichannel name and the value is
                a list of channel names and/or channel urls. The 'defaults' multichannel can
                also be customized using the 'default_channels' parameter (a historical setting
                from when 'defaults' was reserved). If both are defined,
                'custom_multichannels.defaults' takes precedence.
                r   z
                The environment to be automatically activated on startup if 'auto_activate'
                is True. Also sets the default environment to activate when 'conda activate'
                receives no arguments.
                r   z
                The list of channel names and/or urls used for the 'defaults' multichannel.
                Can be overridden by 'custom_multichannels.defaults'.
                r   a  
                Threads to use by default for parallel operations.  Default is None,
                which allows operations to choose themselves.  For more specific
                control, see the other *_threads parameters:
                    * repodata_threads - for fetching/loading repodata
                    * verify_threads - for verifying package contents in transactions
                    * execute_threads - for carrying out the unlinking and linking steps
                r  z
                Package specifications to disallow installing. The default is to allow
                all packages.
                r  z
                Solve an environment and ensure package caches are populated, but exit
                prior to unlinking and linking packages into the prefix
                r   z
                The list of directories to search for named environments. When creating a new
                named environment, the environment will be placed in the first writable
                location.
                r  aY  
                Template for prompt modification based on the active environment. Currently
                supported template variables are '{prefix}', '{name}', and '{default_env}'.
                '{prefix}' is the absolute path to the active environment. '{name}' is the
                basename of the active environment prefix. '{default_env}' holds the value
                of '{name}' if the active environment is a conda named environment ('-n'
                flag), or otherwise holds the value of '{prefix}'. Templating uses python's
                str.format() method.
                r  a@  
                **EXPERIMENTAL** While experimental, expect both major and minor changes across minor releases.

                The name of the environment specifier plugin that should be used for this context.
                If not specified, the plugin manager will try to detect the plugin to use.
                r   z
                Threads to use when performing the unlink/link transaction.  When not set,
                defaults to 1.  This step is pretty strongly I/O limited, and you may not
                see much benefit here.
                r   z
                Additional platform(s)/subdir(s) for export (e.g., linux-64, osx-64, win-64), current
                platform is always included.
                r   z
                Threads to use when downloading packages.  When not set,
                defaults to None, which uses the default ThreadPoolExecutor behavior.
                r  z
                Ensure that any user-requested package for the current operation is uninstalled
                and reinstalled, even if that package already exists in the environment.
                r  zY
                Ensure all output written to stdout is structured json.
                r  zd
                Default fields to report as columns in the output of `conda list`.
                r  ax  
                For a value of False or 0, always fetch remote repodata (HTTP 304 responses
                respected). For a value of True or 1, respect the HTTP Cache-Control max-age
                header. Any other positive integer values is the number of seconds to locally
                cache repodata before checking the remote server for an update.
                r   z
                A list of previously-used channel_alias values. Useful when switching between
                different Anaconda Repository instances.
                r  z
                A map of key-value pairs where the key is a channel name and the value is
                the previous location of the channel.
                r  zj
                Disable all currently-registered plugins, except built-in conda plugins.
                r  z
                Allows completion of conda's create, install, update, and remove operations, for
                non-privileged (non-root or non-administrator) users.
                r  z
                Notify if a newer version of conda is detected during a create, install, update,
                or remove operation.
                r  zc
                Restrict conda to cached download content and file:// based urls.
                r  zZ
                Permit use of the --override-channels command-line flag.
                r  aj  
                The method by which conda handle's conflicting/overlapping paths during a
                create, install, or update operation. The value must be one of 'clobber',
                'warn', or 'prevent'. The '--clobber' command-line flag or clobber
                configuration parameter overrides path_conflict set to 'prevent'.
                r  z
                A list of package specs to pin for every environment resolution.
                This parameter is in BETA, and its behavior may change in a future release.
                r   zn
                Enable plugins to allow conda to interact with non-conda-installed packages.
                r   z
                The list of directories where locally-available packages are linked from at
                install time. Packages not locally available are downloaded and extracted
                into the first writable directory.
                r  a  
                A mapping to enable proxy settings. Keys can be either (1) a scheme://hostname
                form, which will match any request to the given scheme and exact hostname, or
                (2) just a scheme, which will match requests to that scheme. Values are are
                the actual proxy server, and are of the form
                'scheme://[user:password@]host[:port]'. The optional 'user:password' inclusion
                enables HTTP Basic Auth with your proxy.
                r  zP
                Disable progress bar display and other output.
                r  z
                The number seconds conda will wait for your client to establish a connection
                to a remote url resource.
                r  zd
                The maximum number of retries each HTTP connection should attempt.
                r  zi
                The factor determines the time HTTP connection should wait for attempt.
                r  z
                Once conda has connected to a remote resource and sent an HTTP request, the
                read timeout is the number of seconds conda will wait for the server to send
                a response.
                r   z
                Threads to use when downloading and reading repodata.  When not set,
                defaults to None, which uses the default ThreadPoolExecutor behavior.
                r   z
                Opt in, or opt out, of automatic error reporting to core maintainers. Error
                reports are anonymous, with only the error stack trace and information given
                by `conda info` being sent.
                r  z
                Should any error occur during an unlink/link transaction, revert any disk
                mutations made to that point in the transaction.
                r  z
                Enforce available safety guarantees during package installation.
                The value must be one of 'enabled', 'warn', or 'disabled'.
                r  a  
                Treat .tar.bz2 files as different from .conda packages when
                filenames are otherwise similar. This defaults to False, so
                that your package cache doesn't churn when rolling out the new
                package format. If you'd rather not assume that a .tar.bz2 and
                .conda from the same place represent the same content, set this
                to True.
                r  z
                Spend extra time validating package contents.  Currently, runs sha256 verification
                on every file within each package during installation.
                r   z
                Base URL for obtaining trust metadata updates (i.e., the `*.root.json` and
                `key_mgr.json` files) used to verify metadata and (eventually) package signatures.
                r  z
                Allow packages to create OS-specific shortcuts (e.g. in the Windows Start
                Menu) at install time.
                r  zX
                Create shortcuts only for the specified package names.
                r  zc
                Show channel URLs when displaying what is going to be downloaded.
                r  aT  
                Conda verifies SSL certificates for HTTPS requests, just like a web
                browser. By default, SSL verification is enabled, and conda operations will
                fail if a required url's certificate cannot be verified. Setting ssl_verify to
                False disables certification verification. The value for ssl_verify can also
                be (1) a path to a CA bundle file, (2) a path to a directory containing
                certificates of trusted CA, or (3) 'truststore' to use the
                operating system certificate store.
                r  z
                A list of features that are tracked by default. An entry here is similar to
                adding an entry to the create_default_packages list.
                r  a  
                Specify filenames for repodata fetching. The default is ('current_repodata.json',
                'repodata.json'), which tries a subset of the full index containing only the
                latest version for each package, then falls back to repodata.json.  You may
                want to specify something else to use an alternate index that has been reduced
                somehow.
                r  z[
                Use cache of channel index files, even if it has expired.
                r   a'  
                A boolean indicating that only .tar.bz2 conda packages should be downloaded.
                This is forced to True if conda-build is installed and older than 3.18.3,
                because older versions of conda break when conda feeds it the new file format.
                r   zf
                Sets output log level. 0 is warn. 1 is info. 2 is debug. 3 is trace.
                r   z
                Threads to use when performing the transaction verification step.  When not set,
                defaults to 1.
                r  a  
                The exclusive list of channels allowed to be used on the system. Use of any
                other channels will result in an error. If conda-build channels are to be
                allowed, along with the --use-local command line flag, be sure to include the
                'local' channel in the list. If the list is empty or left undefined, no
                channel exclusions will be enforced.
                r  a  
                The list of channels that are denied to be used on the system. Use of any
                of these channels will result in an error. If conda-build channels are to be
                allowed, along with the --use-local command line flag, be sure to not include
                the 'local' channel in the list. If the list is empty or left undefined, no
                channel exclusions will be enforced.
                r  z
                A boolean to determine if conda should find conflicting packages in the case
                of a failed install.
                r  ar  
                An integer that specifies how many levels deep to search for unsatisfiable
                dependencies. If this number is 1 it will complete the unsatisfiable hints
                fastest (but perhaps not the most complete). The higher this number, the
                longer the generation of the unsat hint will take. Defaults to 3.
                rJ  aV  
                A string to choose between the different solver logics implemented in
                conda. A solver logic takes care of turning your requested packages into a
                list of specs to add and/or remove from a given environment, based on their
                dependencies and specified constraints.
                r  a  
                Sets the number of channel notices to be displayed when running commands
                the "install", "create", "update", "env create", and "env update" . Defaults
                to 5. In order to completely suppress channel notices, set this to 0.
                r  zJ
                List of experimental features to enable.
                r  zQ
                Disable index cache lock (defaults to enabled).
                r  zb
                Disable check for `repodata.json.zst`; use `repodata.json` only.
                r  zg
                Force uppercase for new environment variable names. Defaults to True.
                r   z}
                Configure different backends to be used while rendering normal console output.
                Defaults to "z".
                r   zK
                Set override values for virtual packages.
                r   )r   r   r<   r   s    r   r  Context.description_map  s    e	
# e	
 (,(e	
* $($+e	
4 !
5e	
J Ke	
V !	We	
j ke	
v !we	
@ Ae	
L #Me	
V We	
f ge	
t ue	
@ Ae	
J "
Ke	
d ee	
n "oe	
| !}e	
J !%!Ke	
d ee	
p %)%qe	
z {e	
H !
Ie	
^ "&
"_e	
x $($ye	
F "Ge	
b !	ce	
v !%!we	
B Ce	
N Oe	
\ 
]e	
r #'#se	
B !Ce	
P "Qe	
\ ]e	
h !ie	
P	 Q	e	
Z	 [	e	
d	  $ e	e	
t	 &*&u	e	
@
 &*&A
e	
X
 Y
e	
b
 #c
e	
n
 #'#o
e	
z
 {
e	
D '+'Ee	
N Oe	
^ !_e	
j *.*ke	
t ue	
B 	Ce	
V We	
` )-)ae	
l  $ me	
v #'#we	
@ &*&Ae	
N "Oe	
Z [e	
h "ie	
t ue	
@ #'	#Ae	
T !%!Ue	
` '+'ae	
l me	
x  ye	
B #Ce	
L 
Me	
b  ce	
n oe	
@ !Ae	
J "Ke	
X Ye	
b  ce	
n  $ oe	
@ #Ae	
R !%!Se	
^ -1-_e	
n oe	
~ $($e	
L Me	
V We	
` "ae	
j %)%ke	
t >? @ue	
@ '+'Ae	
 e		
r   )__conda_buildNN)r  PathsType | Noner   Namespace | None)returnzlist[ValidationError])r  r`   )r  r_   r  r   )r  tuple[PathType, ...])r  tuple[str, ...]r  rY   )r  zdict[str, Any])r  z
int | None)r  ztuple[str, str])r  zfrozenset[str])r  r  )r  bool)r  ztuple[MatchSpec, ...])r  
str | None)r  zdict[str, str | None])r  r[   )r  ztuple[Channel, ...])r  zlist[Channel])r  zdict[str, tuple[Channel, ...]])r  zdict[str, Channel])r  bool | None)r_  r   r   rT   r  zIterator[None])r  ztuple[str | None, str | None])r  r   )r  z	list[str])r  zdict[str, tuple[str, ...]])r  zdict[str, str])__name__
__module____qualname____firstlineno__r#   r$   r  r  r  r  r  r  rH   r  r  r  r  r  r  r   r   r  r%   r  r  r  r   r   r  r  r  r  r  r   propertyr1   r   r  rU  rX  r[  r_  rd  r6   r  rN   r  r  r  r  rM   r  r  r  r  r  r  r  r  r  r  r   r  rg  ro  ry  r  r  r   r  r  r  r"   r  r  r  r  r  r  r  r7   r   r  rK   FLEXIBLEr  r  r  r=   r	  r  r8   r  r  r  r  r  r  r  r  rF   r  r"  r  r  r  r6  r5  r  r  r!  r  r  r<   r  r;   r   r  r  r  r  r$  r  r  r  r7  r  r  r  r  rL   NOT_SETr  rP   UPDATE_SPECSr  rO   PYCOSATr  r  r?   rJ  r  r  r  r  r  r1  r&  r0  rD  rC  rC   r  r  r  r  r   r  r   r   r3  r:  r   r?  r   rN  rG  r   r   r   r   r   r   r   rh  r   r   rs  r   rK  r   r   r   r  r  r  r  r   r  r   r  r  r  r   r  r   r   r  r   r   r   r   r  r   r   r   r   r0  r   r   r?  r   rP  rL  r   ra  rU  rW  rX  rY  rZ  r   r   r   r   r  r  r  r  r  r  __static_attributes____classcell__)r
  s   @r   r   r      s   #23Ed3K#L ,-?-FG"#5d#;<L%&8&?@O'4 *: $4 *AM .=)3N !!3A!67J+,>t,DE078G 24 89I !34F!GHJ ,4sHo>  /,RcBC,  $$6t$<=M)*<T*BC$"$x0	
N $$6u$=>M)*<U*CD!"4U";<K'(:4(@A#25!+C$  )VW1 X 1 '13/9M (13/9N %13/9KN &13/9LO '13/9M
 #2r46X	
 0	# $$6|7H7H$IJM)*<U*CD!04sHo>." $$6|7K7K$LMM%r4s	
O
 *r4s	
 	 ''9$'?@$,RcBCN &&8&?@O+,>u,EF"2(CL !r4rzz	
 +J !,R56J
 04kJG,R56H (,R567
 )1D#;7 !T{7L	
  J &4sHo> O
 *4sHo>$
 $'sHo>?DM #22DT2J"K./A$/GH();A)>?+,>q,AB(4 *@ --?-FG$0=UV"N
 ''9/:R:R'ST,RcBBO
 I ','9"3'OPQ ''=?VW$
 ,&'9"3'OPQ)
 (,RcBDTU%
 !0,RcBC-!  /'=>4  !00B40H I'4tX.>?   25 9:I(,RcBC'
 (,RcBC #r4$k2	
L (4tX.>?%
 &&8&?WO!"4U";YOK 4tX.>?J /6	JF/6	JF
,U3
4C078G'IJ% .u56E-e45D;#NH "r4--	
K 078G.u56E#$6u$=>M$4tX.>?"N   24 89I,-?PS-TU 24 89I$,RcBCPTN !13/9QJ ##45GC5P#QRL078G&'9$'?@-.@.FG
 $$6|7K7K$LMM%&89T9T&UVO !3O4K4K!LMJ./A%/HI>*(F ##5e#<=L%&8&?@O,-?-CD)*<T*BC&56H6K&L# 1"56H%4tX.>?#O /3ZHF"'=>.L
 "1'C?KLA" !!3J!?@J )-*./%/ (/ / * $ $ = = &	 
& #	 
# 
 
( K K ) )   ! ! * * : : - - > > ; ;     % %
 8 8 8 8 : : 	: 	: , ,   
 

   	 	 5 5 ) ) 1 1 M M
 - -
 % % # # V
; ; 7 7
   ! !F Q Q 
 
 
 
 @ @ 
 
0 
 
  E E0 
 
 $ $ $ $ # # # # # # # # # #, # # 
 
 	! 	! $ $     K K
 5 5 7 70 ) )  
 P
" " = = 7 7* 5 5 
 
& R R H
 H
T$ f	
 f	
r   r   c                   SSK Jn  UR                  " 5         [        R                  " 5         [
        R                  X5        [
        R                  R                  SS 5        SSK	J
n  UR                  " 5         SSKJn  [        [        5         [
        ?S S S 5        UR	                  5         [
        $ ! , (       d  f       N$= f)Nr   r^   rB  rZ   )_get_render_func)plugins.configr_   remove_all_plugin_settingsr'   cache_clearr  r  __dict__popr  r[   _reset_state	reportersr  r   rC  r  )r  r   r_   r[   r  s        r   reset_contextr  
  s     .++-  "[00$7(
 - 
.	!O 
"   "N 
"	!s   B33
Cc              +    #    U (       d  U(       ae  [         R                  R                  5       n[         R                  R                  U =(       d    0 5        [         R                  R                  U5        [	        XS9v   U (       d  U(       aH  [         R                  R                  5         [         R                  R                  W5        [	        5         g g 7f)Nr  r   )r  r  r   updater  clear)envr  r   r	  old_envs        r   fresh_contextr  *  s      f**//#


#)$


&!
K
MM
f





'" s   CCc                  N    \ rS rSr\S4   SS jjr\S4     SS jjrS rSrg)	ContextStackObjecti<  Nc                &    U R                  X5        g r   )	set_valuer   r  r   s      r   r  ContextStackObject.__init__=  s    
 	{2r   c                    Xl         X l        g r   r  r  s      r   r  ContextStackObject.set_valueD  s    
 '*r   c                D    [        U R                  U R                  5        g r   )r  r  r   r   s    r   applyContextStackObject.applyL  s    d&&(:(:;r   )r   r  )r  rX   r   r  r  rX   r   r  r  None)	r  r   r  r  rI   r  r  r$  r  r   r   r   r  r  <  sO     "-*.33 (3 "-*.++ (+ 
	+<r   r  c                  :    \ rS rSrS rS	S jrS rS rS	S jrSr	g)
ContextStackiP  c                    [        S5       Vs/ s H  n[        5       PM     snU l        SU l        S U l        S U l        g s  snf )Nr   r   )ranger  _stack
_stack_idx_last_search_path_last_argparse_args)r   _s     r   r  ContextStack.__init__Q  s<    5:1X>X)+X>!%#'  ?s   A c                l   U =R                   S-  sl         [        U R                  5      nU R                   U:  a=  U R                  R                  [	        U5       Vs/ s H  n[        5       PM     sn5        U R                  U R                      R                  X5        U R                  5         g s  snf r^  )r-  r   r,  extendr+  r  r  r$  )r   r  r   old_lenr0  s        r   pushContextStack.pushW  s}    1dkk"??g%KKeGnMn 2 4nMNDOO$..{J

  Ns   B1c                   U R                   U R                  U R                     R                  :w  d1  U R                  U R                  U R                     R
                  :w  ax  U R                  U R                     R                  5         U R                  U R                     R                  U l         U R                  U R                     R
                  U l        g g r   )r.  r,  r-  r  r/  r   r$  r   s    r   r$  ContextStack.apply_  s    ""dkk$//&B&N&NN''4;;t+G+U+UU KK(..0%)[[%A%M%MD"'+{{4??'C'Q'QD$ Vr   c                |    U =R                   S-  sl         U R                  U R                      R                  5         g r^  )r-  r,  r$  r   s    r   r  ContextStack.popi  s)    1DOO$**,r   c                    U R                   U R                     R                  X5        U R                   U R                     R                  5         g r   )r,  r-  r  r$  r  s      r   replaceContextStack.replacem  s6    DOO$..{JDOO$**,r   )r/  r.  r,  r-  Nr&  )
r  r   r  r  r  r5  r$  r  r<  r  r   r   r   r)  r)  P  s    (R--r   r)  c                f    U (       a  [         R                  X5        g [         R                  5         g r   )context_stackr5  r  pushingr  r   s      r   stack_contextrB  u  s#    
 ;6 	r   c                    [        U SUS9$ Nr   r  )rB  rA  r   s     r   stack_context_defaultrF    s     bNNr   c                ,    [         R                  X5      $ r   r?  r<  r@  s      r   replace_contextrI    s       <<r   c                *    [         R                  SUS9$ rD  rH  rE  s     r   replace_context_defaultrK    s    
   R} MMr   c                    U (       d  g [        U [        R                  5      (       a  [        $ [	        U 5      u  p[        R
                   H  n[        X15      (       d  M  Us  $    U $ r   )r-   r  r   rH   
path_splitr   )r  maybe_envs_dir
maybe_namer  s       r   env_namerP    sV    67..//!+F!3N%%x00 & Mr   c                "   U (       d  [        S5      eU [        ;   a  [        R                  $ Uc  [        R                  nU H=  n[        U5      (       d  M  [        X 5      n[        U5      (       d  M2  [        U5      s  $    SSKJ	n  U" U 5      e)zFind the location of a prefix given a conda env name. If the location does not exist, an
error is raised. If the prefix is the base or root env, the root prefix is returned.
z'name' cannot be empty.r   r  )
r   rG   r  r   r   r   r   r
   r  r  )r  r   r  r  r  s        r   r  r    s|     233!!"""%%	Xh%==6?"  5
!$
''r   c                &  ^ SSK JnJn  SSKJm  [
        R                   VVs/ s H  nT" U5      R                    H  nUPM     M!     nnn[
        R                   VVs/ s H  nT" U5      R                    H  nUPM     M!     nnnU(       d  U(       aI  [        TU 5       H9  nUR                   H&  nXF;   a  U" U5      eU(       d  M  XE;  d  M   U" U5      e   M;     [        U4S j[        R                  U 5       5       5      $ s  snnf s  snnf )a,  
Validate if the given channel URLs are allowed based on the context's allowlist
and denylist configurations.

:param channels: A list of channels (either URLs or names) to validate.
:raises ChannelNotAllowed: If any URL is not in the allowlist.
:raises ChannelDenied: If any URL is in the denylist.
r   )ChannelDeniedChannelNotAllowedrZ   c              3  `   >#    U  H#  nT" U5      R                   [        :w  d  M  Uv   M%     g 7fr   )canonical_namerJ   )r   r   r[   s     r   r   $validate_channels.<locals>.<genexpr>  s-      .G7**o= 	.s   .	.)r  rS  rT  r  r[   r  r  	base_urlsr  mapr   r   r   )r   rS  rT  r   r  	allowlistdenylistr[   s          @r   r  r    s    >( 111G7#--C 	- 	1   000G7#--C 	- 	0  
 H7H-G((?'009!5+G44	 ) .  }}X.  %
s   &D&Dr   r   z7Use PrefixData.validate_name() + PrefixData.from_name()r   c           	     2   SSK Jn  [        R                  " U 5      (       a  U" [	        SU < S[         S35      5      eU [
        ;   a  U(       a  UR                  $ U" S5      eSSK Jn  SSKJ	n   [        U 5      $ ! U a    [        U" 5       U 5      s $ f = f)	z9Run various validations to make sure prefix_name is validr   )CondaValueErrorz+
                Invalid environment name: z)
                Characters not allowed: z
                If you are specifying a path to an environment, the `-p`
                flag should be used instead.
                z6Use of 'base' as environment name is not allowed here.r  first_writable_envs_dir)r  r]  rE   intersectionr   rG   r   r  r  r_  r  r   )prefix_namectx
allow_baser]  r  r_  s         r   validate_prefix_namerd    s     -#00==++6/ :))E(F G	
 		
 ((??"!H 
 	9B	@(55& 	@/1;??	@s   1
A< <BBc                   U=(       d    U R                   n UR                  n UR                  nUb#  UR	                  5       (       d  SSKJn  U" S5      eUb#  UR	                  5       (       d  SSKJn  U" S5      eUc  Uc  U R                  $ Ub  [        U5      $ SSK	J
n  [        UR                  U5      R                  5      $ ! [         a    Sn Nf = f! [         a    Sn Nf = f)zGet the prefix to operate in.  The prefix may not yet exist.

Args:
    ctx: the context of conda
    args: the argparse args from the command line

Returns: the prefix
Raises: CondaEnvironmentNotFoundError if the prefix is invalid
Nr   r  z!Argument --name requires a value.z#Argument --prefix requires a value.)
PrefixData)rv  r  rC  r  stripr  r  r  r,   core.prefix_datarf  r   	from_nameprefix_path)rb  argsr   ra  rj  r  rf  s          r   r  r  	  s     .C..M#((#** {'8'8':':.?@@{'8'8':':.ABB{2!!!		 k""1:''4@@AA1    s"   C C CCC'&C'z6Use conda.gateways.disk.create.first_writable_envs_dirc                     SSK Jn   U " 5       $ )Nr   r^  )conda.gateways.disk.creater_  r^  s    r   _first_writable_envs_dirrn  <	  s     C"$$r   z:Use `conda.base.context.context.plugins.raw_data` instead.c                2    SSK Jn  U" U 5      R                  $ Nr   r^   )r  r_   r  )datar_   s     r   get_plugin_config_datarr  E	  s     .&&&r   zCUse `conda.plugins.config.PluginConfig.add_plugin_setting` instead.r   c                4    SSK Jn  UR                  " XU5      $ rp  )r  r_   add_plugin_setting)r  	parameterr   r_   s       r   rt  rt  R	  s     .**4GDDr   zKUse `conda.plugins.config.PluginConfig.remove_all_plugin_settings` instead.c                 0    SSK Jn   U R                  " 5       $ rp  )r  r_   r  r^   s    r   r  r  a	  s     .2244r   )file)NNNF)
r~   r  rz   zstr | None | Literal[False]r{   r  r|   r  r  rY   )r   r  r   rY   r   rX   r  r  )r   r   r  str | Literal[True]r  )r   Iterable[str]r  rx  )r  rX   r   r  r  r   )r  zdict[str, str] | Noner  rX   r   r  r  zIterator[Context])rA  r  r  rX   r   r  r  r'  r   )rA  r  r   r  r  r'  )rA  r  r  ry  r   r  r  r'  r  )rA  r  r   r  r  r'  )r  rY   r  zPathType | str | None)r  r   r   r  r  rY   )r   zIterator[str]r  r  )T)ra  r   rb  r   rc  r  r  rY   )rb  r   rk  r  r  rY   r  )rq  #dict[Path, dict[str, RawParameter]]r  rz  )r   )r  r   ru  rV   r   r  r  r'  )r  r'  )__doc__
__future__r   r:  r  rG  r  r   r  
contextlibr   r   errnor   	functoolsr   r   	itertoolsr	   os.pathr
   r   r   r   r   r   r   rM  pathlibr   typingr   r   r   r   r   rT  auxlib.decoratorsr   
auxlib.ishr   common._os.linuxr   common._os.osxr   common.compatr   r   common.configurationr   r    r!   r"   r#   r$   r%   r&   r'   common.constantsr(   common.iteratorsr)   r*   common.pathr+   r,   r-   
common.urlr.   r/   r0   deprecationsr1   	constantsr3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   argparserQ   collections.abcrR   rS   rT   rU   rV   rW   rX   rY   r  r[   r  r]   r  r_   r  r`   getcwdr  r  chdirr  	getLoggerr  r  rR  rI  rJ  rv   __annotations__rw   ry   r   r   r   r   r   r   r   r  r  r  r)  r?  rB  rF  rI  rK  conda_tests_ctxt_mgmt_def_polrP  r  r  rd  r  rn  rr  rt  r  r  printreprstderrexitr   r   r   <module>r     s   #  	   
  /  ,  D D '    !   + 0  5 $ ,
 
 
 % 6 < < I I %       B "2#>1(--4IIK ! 	  	
 !b1I0J,K!LMh MSZZ)ABX B -1	
Y
Y*
Y 
Y 	
Y
 
YUU&.U<EUU$,
V o
m o
f9 )&*# @ !%(&*	 $
  "< <(- -D 
 )&*


 $
 
	
$ '+OO#O 
O  !,&*=== $= 
	=  &*NN#N 
N !8 
(,"J 
FV 8<!@!@"!@04!@!@!@H%BP 
FU%% 

I
'
-'('
' 

R  "E
EE E 
	E
E 

Z
5
5b$GWH  ww& 	XH  	$q'

#HHQKKs6   L =	M M,M ?M  MN+M>>N