+
    :1jJ                    n   R t ^ RIHt ^ RIt^ RIt^ RIHtHt ^ RIH	t	H
t
 ^ RIHt ^ RIHt ^ RIHt ]'       dB   ^ RIHtHt ^ R	IHt ^ R
IHtHtHtHt ^ RIHt ]! R4      t]! R4      t]! R]],          R7      t^RIH t   ! R R]!4      t"]#! 4       t$ ! R R4      t%]	 ! R R4      4       t&]%! ] 4      t'R# )z!Tools to aid in deprecating code.)annotationsN)SUPPRESSAction)	dataclassfield)wraps)
ModuleType)TYPE_CHECKING)ArgumentParser	Namespace)Callable)Any	ParamSpecSelfTypeVar)VersionTP
ActionType)bound)__version__c                      ] tR t^tRtR# )DeprecatedError N)__name__
__module____qualname____firstlineno____static_attributes__r       2lib/python3.14/site-packages/conda/deprecations.pyr   r      s    r   r   c            	      .   ] tR t^'t$ R]R&   R]R&   R]R&   R R lt]R	 R
 l4       tR R ltRRR^ R]	/R R llt
RRRRR^ R]	/R R lltRRR^ R]/R R lltRRR^ /R R llt]3RRRRR^ R]	/R R llltRRR^ R]	/R R lltR R  ltR! R" ltR#tR# )$DeprecationHandler
str | None_versiontuple[int, ...] | None_version_tuplezVersion | None_version_objectc               $    V ^8  d   QhRRRRRR/# )   selfr   versionstrreturnNoner   )formats   "r    __annotate__DeprecationHandler.__annotate__,   s!     	$ 	$t 	$c 	$d 	$r   c                L    Wn         V P                  V4      V n        RV n        R# )zFactory to create a deprecation handle for the specified version.

:param version: The version to compare against when checking deprecation statuses.
N)r$   _get_version_tupler&   r'   )r*   r+   s   &&r    __init__DeprecationHandler.__init__,   s&    
   #55g>#r   c                    V ^8  d   QhRRRR/# )r)   r+   r,   r-   r%   r   )r/   s   "r    r0   r1   8   s      C ,B r   c                    \         ;QJ d1    . R V P                  4       P                  R4       4       F  NK  	  5M*! R V P                  4       P                  R4       4       4      ;'       g    R#   \        \        3 d     R# i ; i)zlReturn version as non-empty tuple of ints if possible, else None.

:param version: Version string to parse.
c              3  8   "   T F  p\        V4      x  K  	  R # 5iN)int).0parts   & r    	<genexpr>8DeprecationHandler._get_version_tuple.<locals>.<genexpr>>   s     J/ItT/Is   .N)tuplestripsplitAttributeError
ValueError)r+   s   &r    r3   %DeprecationHandler._get_version_tuple7   sg    	5Jw}}/D/DS/IJ55Jw}}/D/DS/IJJRRdR
+ 		s   
A2 A!A2 /A2 2BBc               $    V ^8  d   QhRRRRRR/# )r)   r*   r   r+   r,   r-   boolr   )r/   s   "r    r0   r1   B   s!     5 5 5 5 5r   c                4   V P                   '       d)   V P                  V4      ;p'       d   V P                   V8  # ^ RIHp V P                  f    V! V P
                  4      V n        V P                  V! V4      8  #   \         d    T! R4      T n         L/i ; i)zmTest whether own version is less than the given version.

:param version: Version string to compare against.
)parsez0.0.0.dev0+placeholder)r&   r3   packaging.versionrI   r'   r$   	TypeError)r*   r+   version_tuplerI   s   &&  r    _version_less_than%DeprecationHandler._version_less_thanB   s    
 T5L5LW5U$UM$U&&66
 	,'G',T]]';$ ##eGn44  G',-E'F$Gs   A< <BBaddendumNstackdeprecation_typec               4    V ^8  d   QhRRRRRRRRRR	R
RRR/# )r)   r*   r   deprecate_inr,   	remove_inrO   r#   rP   r:   rQ   type[Warning]r-   *Callable[[Callable[P, T]], Callable[P, T]]r   )r/   s   "r    r0   r1   W   sN     :$ :$:$:$ :$
 :$ :$ (:$ 
4:$r   c               .   a aaaaa R VVVVV V3R llpV# )aJ  Deprecation decorator for functions, methods, & classes.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param addendum: Optional additional messaging. Useful to indicate what to do instead.
:param stack: Optional stacklevel increment.
c                    V ^8  d   QhRRRR/# )r)   objCallable[P, T]r-   r   )r/   s   "r    r0   1DeprecationHandler.__call__.<locals>.__annotate__h   s     '	 '	n '	 '	r   c                f  <aaa S
P                  SS	V P                   R V P                   2SSR7      w  ooS'       g   \        S4      hRp\	        V \
        4      '       d    V P                  oRpMV o\        S4      R VVVV3R ll4       pV'       d	   W n        V # V#   \         d    T o L;i ; i)r?   rS   rT   prefixrO   rQ   FTc               $    V ^8  d   QhRRRRRR/# r)   argszP.argskwargszP.kwargsr-   r   r   )r/   s   "r    r0   ODeprecationHandler.__call__.<locals>.deprecated_decorator.<locals>.__annotate__   s!     - -V -x -A -r   c                 T   < \         P                  ! SS^S,           R7       S! V / VB # )r)   
stacklevel)warningswarn)ra   rb   categoryfuncmessagerP   s   *,r    innerHDeprecationHandler.__call__.<locals>.deprecated_decorator.<locals>.inner   s'    gxAIFT,V,,r   )	_generate_messager   r   r   
isinstancetyper4   rC   r   )rY   isclassrl   ri   rj   rk   rO   rS   rQ   rT   r*   rP   s   &  @@@r    deprecated_decorator9DeprecationHandler.__call__.<locals>.deprecated_decoratorh   s     $ 6 6)#..)3+;+;*<=!!1 !7 !Hg %g.. G#t$$#<<D
 #G 4[- - -
 $
' & Ds   #B   B0/B0r   )r*   rS   rT   rO   rP   rQ   rr   s   fffddd r    __call__DeprecationHandler.__call__W   s    "'	 '	R $#r   renamec               <    V ^8  d   QhRRRRRRRRRRR	RR
RRRRR/	# )r)   r*   r   rS   r,   rT   argumentrv   r#   rO   rP   r:   rQ   rU   r-   rV   r   )r/   s   "r    r0   r1      sb     6$ 6$6$6$ 6$ 	6$ 6$ 6$ 6$ (6$ 
46$r   c          	     6   a aaaaaaa R VVVVVVV V3R llpV# )a  Deprecation decorator for keyword arguments.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param argument: The argument to deprecate.
:param rename: Optional new argument name.
:param addendum: Optional additional messaging. Useful to indicate what to do instead.
:param stack: Optional stacklevel increment.
c                    V ^8  d   QhRRRR/# )r)   rj   rZ   r-   r   )r/   s   "r    r0   1DeprecationHandler.argument.<locals>.__annotate__   s     	 	~ 	. 	r   c           
       <a aa S
P                  SSS P                   R S P                   RS R2S	'       d   S'       g   RS	 R2MSSR7      w  ooS'       g   \        S4      h\	        S 4      R VVV VV	V3R ll4       pV# )r?   ()zUse 'z
' instead.r]   c               $    V ^8  d   QhRRRRRR/# r`   r   )r/   s   "r    r0   ODeprecationHandler.argument.<locals>.deprecated_decorator.<locals>.__annotate__   s!     
- 
-V 
-x 
-A 
-r   c                    < SV9   dM   \         P                  ! SS^S,           R7       VP                  SR4      pS'       d   VP                  SV4       S! V / VB # )r)   re   N)rg   rh   pop
setdefault)	ra   rb   valuerx   ri   rj   rk   rv   rP   s	   *, r    rl   HDeprecationHandler.argument.<locals>.deprecated_decorator.<locals>.inner   sV     v%MM'8E	J #JJx6E))&%8T,V,,r   )rn   r   r   r   r   )rj   rl   ri   rk   rO   rx   rS   rQ   rT   rv   r*   rP   s   f @@r    rr   9DeprecationHandler.argument.<locals>.deprecated_decorator   s     $ 6 6)#//*!D,=,=+>azK 39eF8:.x!1 !7 	!Hg %g.. 4[
- 
- 
- Lr   r   )	r*   rS   rT   rx   rv   rO   rP   rQ   rr   s	   ffffdddd r    rx   DeprecationHandler.argument   s    *	 	B $#r   c               8    V ^8  d   QhRRRRRRRRRR	R
RRRRR/# )r)   r*   r   rS   r,   rT   actionr   rO   r#   rP   r:   rQ   rU   r-   r   )r/   s   "r    r0   r1      sb     >E >E>E>E >E 	>E >E >E (>E 
>Er   c               l   a aaaaa  ! VVVVV V3R lR\         4      p\        VP                  Ws3/ 4      # )z9Wraps any argparse.Action to issue a deprecation warning.c                  h   <a  ] tR t^t$ R]R&   R]R&   R V VVVVV3R lltR
R V V3R llltR	tV ;t# )3DeprecationHandler.action.<locals>.DeprecationMixinrU   ri   r,   helpc               (    V ^8  d   QhRRRRRRRR/# )r)   
inner_selfr   ra   r   rb   r-   r.   r   )r/   s   "r    r0   @DeprecationHandler.action.<locals>.DeprecationMixin.__annotate__   s(     . .T .# . . .r   c                	<  < \         SV `  ! V/ VB  S
P                  SS	V P                  '       d   R V P                  R,           R 2MR V P                   R 2SSR7      w  r4V'       g   \        V4      hW0n        W@n        V P                  \        Jd	   W@n        R# R# )`r]   N)
superr4   rn   option_stringsdestr   ri   deprecationr   r   )r   ra   rb   ri   rk   	__class__rO   rS   rQ   rT   r*   s   &*,  r    r4   <DeprecationHandler.action.<locals>.DeprecationMixin.__init__   s     $1&1$($:$:!-'
 &444 J55b9:!<  ! 13%%5 %; %!   )'22&.#)0&??(2&-O 3r   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r)   r   r   parserr
   	namespacer   valuesr   option_stringr#   r-   r.   r   )r/   s   "r    r0   r      sL     K K K&K %K 	K
  *K Kr   c                	   < ^ RI Hp W5Jd5   \        P                  ! V P                  V P
                  ^S,           R7       \        SV `  WW44       R# )    )NULLre   N)conda.common.constantsr   rg   rh   r   ri   r   rt   )r   r   r   r   r   r   r   rP   s   &&&&& r    rt   <DeprecationHandler.action.<locals>.DeprecationMixin.__call__   sD     8%MM".."++#$u9  FJr   r   r9   )	r   r   r   r   __annotations__r4   rt   r   __classcell__)r   rO   rS   rQ   rT   r*   rP   s   @r    DeprecationMixinr      s*    ##I. .6K K Kr   r   )r   rp   r   )r*   rS   rT   r   rO   rP   rQ   r   s   fff&ddd r    r   DeprecationHandler.action   s1    0	K 0	Kv 0	Kd FOO&6%?DDr   c               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r)   r*   r   rS   r,   rT   rO   r#   rP   r:   r-   r.   r   )r/   s   "r    r0   r1     sD     
 


 

 
 
 

r   c               l    V P                  VVV P                  V4      ^,          V^V,           R7       R# )a3  Deprecation function for modules.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param addendum: Optional additional messaging. Useful to indicate what to do instead.
:param stack: Optional stacklevel increment.
)rS   rT   topicrO   rP   N)r   _get_module)r*   rS   rT   rO   rP   s   &&&$$r    moduleDeprecationHandler.module  s8     	

%""5)!,e) 	 	
r   factoryc               @    V ^8  d   QhRRRRRRRRRRR	R
RRRRRRRR/
# )r)   r*   r   rS   r,   rT   constantr   r   r   zCallable[[], Any] | NonerO   r#   rP   r:   rQ   rU   r-   r.   r   )r/   s   "r    r0   r1   "  sx     E
 E
E
E
 E
 	E

 E
 *E
 E
 E
 (E
 
E
r   c          	        V\         J VRJ 8X  d   \        RV: R24      hVe"   \        V4      '       g   \        RV: R24      hV P                  V4      w  rV P	                  VVV
 RV 2VVR7      w  rV'       g   \        V4      h\        \        V	RR4      ;p\        4      '       d   TpM\        W4      pWn	        TP                  TTTTVf   TMTVRJR7       R# )	a  Deprecation function for module constant/global.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param constant:
:param value: The value to return when the deprecated constant is
    accessed. Mutually exclusive with ``factory``.
:param factory: A zero-argument callable invoked the first time the
    deprecated constant is accessed; the result is cached. Use this to
    avoid paying registration-time costs (e.g., heavy imports) for a
    symbol that may never be accessed. Mutually exclusive with ``value``.
:param addendum: Optional additional messaging. Useful to indicate what to do instead.
:param stack: Optional stacklevel increment.
Nzdeprecated.constant(z2, ...): pass exactly one of `value` or `factory=`.z;, factory=...): `factory` must be a zero-argument callable.r?   r]   __getattr__)r   )_UNSETrK   callabler   rn   r   ro   getattr_ConstantDeprecationRegistryr   register)r*   rS   rT   r   r   r   rO   rP   rQ   r   fullnameri   rk   fallbackdeprecationss   &&&&&$$$$      r    r   DeprecationHandler.constant"  s#   4 VOD1&xl 3) )  x'8'8&xl 34 4   ++E2 22%Zq
+- 3 
 !'** t<<H(
 
 $L7KL!-_E'4' 	 	
r   c               8    V ^8  d   QhRRRRRRRRRRR	R
RRRR/# )r)   r*   r   rS   r,   rT   r   rO   r#   rP   r:   rQ   rU   r-   r.   r   )r/   s   "r    r0   r1   i  sX      ?  ? ? ?  ?
  ?  ?  ? ( ? 
 ?r   c                   V P                  VVVVVR7      w  rxV'       g   \        V4      h\        P                  ! W^V,           R7       R# )a]  Deprecation function for a topic.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param topic: The topic being deprecated.
:param addendum: Optional additional messaging. Useful to indicate what to do instead.
:param stack: Optional stacklevel increment.
r]   re   N)rn   r   rg   rh   )	r*   rS   rT   r   rO   rP   rQ   ri   rk   s	   &&&$$$$  r    r   DeprecationHandler.topici  sO    & !22%- 3 
 !'** 	gAI>r   c               $    V ^8  d   QhRRRRRR/# )r)   r*   r   rP   r:   r-   ztuple[ModuleType, str]r   )r/   s   "r    r0   r1     s'     $H $H$ $Hs $H/E $Hr   c                    \         P                  ! ^V,           4      p VP                  P                  p\	        \         P
                  P                  4       4       FO  p\        V\        4      '       g   K  \        VR4      '       g   K/  VP                  V8X  g   KB  WDP                  3u # 	  ^ RIpVP                  V4      pVe   WfP                  3#  \!        R4      h  \         d     L?i ; i  \         d     L)i ; i)zDetect the module from which we are being called.

:param stack: The stacklevel increment.
:return: The module and module name.
__file__Nz&unable to determine the calling module)sys	_getframef_codeco_filenamer@   modulesr   ro   r   hasattrr   r   rC   inspect	getmodule
IndexErrorr   )r*   rP   framefilenameloadedr   r   s   &&     r    r   DeprecationHandler._get_module  s    	1MM!e),E9 <<33 $CKK$6$6$89F%fj99 "6:66 (2 &88 : &&u-F!00 " FGG+ "   		s"   C3 C" "C0/C03D Dc               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r)   r*   r   rS   r,   rT   r^   rO   r#   rQ   rU   r-   z tuple[type[Warning] | None, str]r   )r/   s   "r    r0   r1     sN     !
 !
!
!
 !
 	!

 !
 (!
 
*!
r   c          	         V P                  V4      '       d   \        pRV R2pM(V P                  V4      '       d
   TpRV R2pMRpRV R2pVRP                  \        RW7V.4      4      3# )a  Generate the standardized deprecation message and determine whether the
deprecation is pending, active, or past.

:param deprecate_in: Version in which code will be marked as deprecated.
:param remove_in: Version in which code is expected to be removed.
:param prefix: The message prefix, usually the function name.
:param addendum: Additional messaging. Useful to indicate what to do instead.
:param deprecation_type: The warning type to use for active deprecations.
:return: The warning category (if applicable) and the message.
z.is pending deprecation and will be removed in r?   z%is deprecated and will be removed in Nzwas slated for removal in  )rM   PendingDeprecationWarningjoinfilter)r*   rS   rT   r^   rO   rQ   ri   warnings   &&&&&$  r    rn   $DeprecationHandler._generate_message  s    ( ""<000HFykQRSG$$Y//'H=i[JGH29+Q?G HHVD6H"=>?
 	
r   )r$   r'   r&   )r   r   r   r   r   r4   staticmethodr3   rM   DeprecationWarningrt   rx   FutureWarningr   r   r   r   r   r   rn   r   r   r   r    r"   r"   '   s8   **##	$  5*:$
  $:$ :$ +=:$x6$ "6$  $6$ 6$ +=6$p>E  $>E >E +8>E@

  $
 
8 E
 -1E
  $E
 E
 +=E
 E
N ?  $ ?  ? += ?D$HL!
 !
r   r"   c                  p    ] tR tRt$ Rt]! ]RRR7      tR]R&   R]R&   R	]R
&   R R lt	RR/R R llt
RtR# )r   i  zRegistry of deprecated module constants.

Serves as a module's __getattr__, issuing deprecation warnings
when registered constants are accessed.
F)default_factoryinitreprz4dict[str, tuple[str, type[Warning], int, Any, bool]]r   r,   r   zCallable[[str], Any] | Noner   c                    V ^8  d   QhRRRR/# )r)   namer,   r-   r   r   )r/   s   "r    r0   )_ConstantDeprecationRegistry.__annotate__  s     T TS TS Tr   c                	D   WP                   9   dS   V P                   V,          w  r#rEp\        P                  ! W#VR 7       V'       d   V! 4       pW#WER3V P                   V&   V# V P                  '       d   V P                  V4      # \	        RV P
                   RV R24      h)re   Fzmodule 'z' has no attribute '')r   rg   rh   r   rC   r   )r*   r   rk   ri   rf   r   
is_factorys   &&     r    rt   %_ConstantDeprecationRegistry.__call__  s    $$$?C?P?PQU?V<Gz*MM'
C +2jQV*W!!$'L=====&&x6J4&PQRSSr   r   c               4    V ^8  d   QhRRRRRRRRRR	R
RRR/# )r)   r   r,   rk   ri   rU   rP   r:   r   r   r   rG   r-   r.   r   )r/   s   "r    r0   r     sY     U UU U  	U
 U U U 
Ur   c               	8    W#^V,           WV3V P                   V&   R# )r)   N)r   )r*   r   rk   ri   rP   r   r   s   &&&&&&$r    r   %_ConstantDeprecationRegistry.register  s     (/!e)U&T(#r   r   N)r   r   r   r   __doc__r   dictr   r   rt   r   r   r   r   r    r   r     sQ     JOJLF 
 M))T U U Ur   r   )(r   
__future__r   r   rg   argparser   r   dataclassesr   r   	functoolsr   typesr   typingr	   r
   r   collections.abcr   r   r   r   r   rJ   r   r   r   rp   r    r   RuntimeErrorr   objectr   r"   r   
deprecatedr   r   r    <module>r      s    ( " 
  % (    2(44)A#AT&\:J 	l 	 

k
 k
\ *U *U *UZ  ,
r   