
    h{N                        S r SSKrSSKrSSKrSSKrSSKr " S S\5      r  SSS.S jjrSSSSSSSS	.S
 jr	SSSSSSSS	.S jr
 " S S5      r0 rSS jr " S S5      r\" 5       rSS jrSS jrSS.S jr\R&                  S 5       rg)a   
Helper functions for deprecating parts of the Matplotlib API.

This documentation is only relevant for Matplotlib developers, not for users.

.. warning::

    This module is for internal use only.  Do not use it in your own code.
    We may change the API at any time with no warning.

    Nc                       \ rS rSrSrSrg)MatplotlibDeprecationWarning   z>A class for issuing deprecation warnings for Matplotlib users. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       M/var/www/html/env/lib/python3.13/site-packages/matplotlib/_api/deprecation.pyr   r      s    Hr   r    Fremovalc                h   U(       a  U(       a  [        S5      eO,US:X  a&  U R                  S5      tpn
U S[        U	5      S-    3nU(       d>  U(       a  SOSU(       a  SOSU(       a  S	OS-   -   S-   U(       a  S
OS-   U(       a  SOS-   nU(       a  [        O[        nU" U[        X"XPUX6S9-  5      $ )Nz5A pending deprecation cannot have a scheduled removalr   .   zThe %(name)s %(obj_type)sz%(name)sz' will be deprecated in a future versionz' was deprecated in Matplotlib %(since)sz# and will be removed in %(removal)sz Use %(alternative)s instead.z %(addendum)s)funcnameobj_typesincer   alternativeaddendum)
ValueErrorsplitintPendingDeprecationWarningr   dict)r   messager   r   pendingr   r   r   macromeso_warning_clss               r   _generate_deprecation_warningr&      s     TUU 	B++c*aG1SY]O,,4(*:A678?4RIK 	
 1<,E !)_b2 	 07+<XKwxg"4 4 5 5r   r    r   r   r!   r   r   r   c                @    [        XX#XEUUS9nSSKJn	  U	" U[        S9  g)a  
Display a standardized deprecation.

Parameters
----------
since : str
    The release at which this API became deprecated.
message : str, optional
    Override the default deprecation message.  The ``%(since)s``,
    ``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
    and ``%(removal)s`` format specifiers will be replaced by the values
    of the respective arguments passed to this function.
name : str, optional
    The name of the deprecated object.
alternative : str, optional
    An alternative API that the user may use in place of the deprecated
    API.  The deprecation warning will tell the user about this alternative
    if provided.
pending : bool, optional
    If True, uses a PendingDeprecationWarning instead of a
    DeprecationWarning.  Cannot be used together with *removal*.
obj_type : str, optional
    The object type being deprecated.
addendum : str, optional
    Additional text appended directly to the final message.
removal : str, optional
    The expected removal version.  With the default (an empty string), a
    removal version is automatically computed from *since*.  Set to other
    Falsy values to not schedule a removal date.  Cannot be used together
    with *pending*.

Examples
--------
::

    # To warn of the deprecation of "matplotlib.name_of_module"
    warn_deprecated('1.4.0', name='matplotlib.name_of_module',
                    obj_type='module')
r      )warn_external)categoryN)r&   r   r*   r   )
r   r    r   r   r!   r   r   r   warningr*   s
             r   warn_deprecatedr-   0   s+    T ,7hG  '$@Ar   c                $   ^ ^ XUXEU4UU 4S jjnU$ )a  
Decorator to mark a function, a class, or a property as deprecated.

When deprecating a classmethod, a staticmethod, or a property, the
``@deprecated`` decorator should go *under* ``@classmethod`` and
``@staticmethod`` (i.e., `deprecated` should directly decorate the
underlying callable), but *over* ``@property``.

When deprecating a class ``C`` intended to be used as a base class in a
multiple inheritance hierarchy, ``C`` *must* define an ``__init__`` method
(if ``C`` instead inherited its ``__init__`` from its own base class, then
``@deprecated`` would mess up ``__init__`` inheritance when installing its
own (deprecation-emitting) ``C.__init__``).

Parameters are the same as for `warn_deprecated`, except that *obj_type*
defaults to 'class' if decorating a class, 'attribute' if decorating a
property, and 'function' otherwise.

Examples
--------
::

    @deprecated('1.4.0')
    def the_function_to_deprecate():
        pass
c                 h  >^ ^^^^^^^^^^ SSK Jm  [        T [        5      (       a9  Tc  SmT R                  mT=(       d    T R
                  mT R                  nU 4S jnO[        T [        T45      (       aS  Tc  SmS mT=(       d    T R                  R
                  mT R                  n " UUU4S jS[        T 5      5      mUU 4S jnO.Tc  S	mT mT=(       d    T R
                  mTR                  nU4S
 jnUUUUUUUU4S jmUU4S jn	[        R                  " U=(       d    S5      R                  S5      nSn
SR                  TT(       a  ST S3OST4 Vs/ s H  nU(       d  M  UR                  5       PM     sn5      nSU SX;  a  U
OS ST SU 3nU(       d  US-  nU" X5      $ s  snf )Nr   )classpropertyclassc                    >  UTl         [        R                  " TR                  5      " U 5      Tl        T$ ! [         a     N9f = fN)r   AttributeError	functoolswraps__init__)wrappernew_docobjs     r   finalize/deprecated.<locals>.deprecate.<locals>.finalize   sC    ")CK  )s||<WE
 & s   7 
AA	attributec                   Z   >^  \ rS rSrSU UU4S jjrU U4S jrU U4S jrU4S jrSrU =r	$ );deprecated.<locals>.deprecate.<locals>._deprecated_property   c                 ^   > Uc  Ub  [        U T5      (       a  T" 5         [        TU ]	  X5      $ r3   )
isinstancesuper__get__)selfinstanceowner	__class__r0   emit_warnings      r   rD   Cdeprecated.<locals>.deprecate.<locals>._deprecated_property.__get__   s/    +u/@ *4 ? ?$ 7?8;;r   c                 6   > Ub  T" 5         [         TU ]  X5      $ r3   )rC   __set__)rE   rF   valuerH   rI   s      r   rL   Cdeprecated.<locals>.deprecate.<locals>._deprecated_property.__set__   s    +$ 7?8;;r   c                 6   > Ub  T" 5         [         TU ]  U5      $ r3   )rC   
__delete__)rE   rF   rH   rI   s     r   rP   Fdeprecated.<locals>.deprecate.<locals>._deprecated_property.__delete__   s    +$ 7-h77r   c                    > TS:X  a  Umg g )Nz<lambda>r   )rE   rG   set_namer   s      r   __set_name__Hdeprecated.<locals>.deprecate.<locals>._deprecated_property.__set_name__   s    z)' *r   r   r3   )
r   r   r	   r
   rD   rL   rP   rT   r   __classcell__)rH   r0   rI   r   s   @r   _deprecated_propertyr?      s!    < <<
8
( (r   rW   c                 R   > T" TR                   TR                  TR                  US9$ )N)fgetfsetfdeldoc)rY   rZ   r[   )r$   r9   rW   r:   s     r   r;   r<      s'    +sxxWN Nr   functionc                 L   > [         R                  " T5      " U 5      n Xl        U $ r3   )r5   r6   r   )r8   r9   r   s     r   r;   r<      s     #//$/8")r   c                  &   > [        TTTTTTT TS9  g )Nr'   )r-   )r   r   r    r   r   r!   r   r   s   r   rI   3deprecated.<locals>.deprecate.<locals>.emit_warning   s    wT{(X!r   c                  "   > T" 5         T" U 0 UD6$ r3   r   )argskwargsrI   r   s     r   r8   .deprecated.<locals>.deprecate.<locals>.wrapper   s    N(((r   r   
z
Notes
----- zUse z	 instead.z[*Deprecated*] z
.. deprecated:: z
   z\ )matplotlib._apir0   rB   typer7   r   r   propertyrY   inspectcleandocstripjoin)r:   r    r   r   r!   r   r   old_docr;   r8   notes_headert
second_argr9   rW   r0   rI   r   r   r   s   ```````       @@@@r   	deprecatedeprecated.<locals>.deprecate~   s   1c4  "<<D'3<<DkkG h677&D,388,,DkkG( (tCy (,N
 %D'3<<DllG
	! 	!	) ""7=b177='XX '#. ,0}I)F46 BH B ./EF  )qwwy BH I
 %WIR&2&AlrJ K&&+W -#&
  uG))Hs   F/+F/r   )	r   r    r   r   r!   r   r   r   rr   s	   `      ` r   
deprecatedrt   a   s$    :  '{!xZ* Z*x r   c                   $    \ rS rSrSrS rS rSrg)deprecate_privatize_attribute   a,  
Helper to deprecate public access to an attribute (or method).

This helper should only be used at class scope, as follows::

    class Foo:
        attr = _deprecate_privatize_attribute(*args, **kwargs)

where *all* parameters are forwarded to `deprecated`.  This form makes
``attr`` a property which forwards read and write access to ``self._attr``
(same name but with a leading underscore), with a deprecation warning.
Note that the attribute name is derived from *the name this helper is
assigned to*.  This helper also works for deprecating methods.
c                 $    [        U0 UD6U l        g r3   )rt   
deprecator)rE   rb   rc   s      r   r7   &deprecate_privatize_attribute.__init__   s    $d5f5r   c                 `   ^ [        UTU R                  [        U4S jU4S j5      TS95        g )Nc                 "   > [        U ST 35      $ Nr$   )getattr)rE   r   s    r   <lambda><deprecate_privatize_attribute.__set_name__.<locals>.<lambda>   s    '$!D6
";r   c                 $   > [        U ST 3U5      $ r}   )setattr)rE   rM   r   s     r   r   r      s    4&z5)Ir   )r   )r   ry   ri   )rE   rG   r   s     `r   rT   *deprecate_privatize_attribute.__set_name__   s1    tT__;IK -  	r   )ry   N)r   r   r	   r
   r   r7   rT   r   r   r   r   rv   rv      s    6r   rv   c                 x  ^ ^^^ [         R                  " [        T TT5      nTc  U$ [        R                  " T5      nTUR
                  ;  d   ST< STR                   S35       eTUR
                  ;   d   ST< STR                   S35       e[         R                  " T5      UUUU 4S j5       nU[        U'   U$ )aZ  
Decorator indicating that parameter *old* of *func* is renamed to *new*.

The actual implementation of *func* should use *new*, not *old*.  If *old*
is passed to *func*, a DeprecationWarning is emitted, and its value is
used, even if *new* is also passed by keyword (this is to simplify pyplot
wrapper functions, which always pass *new* explicitly to the Axes method).
If *new* is also passed but positionally, a TypeError will be raised by the
underlying function during argument binding.

Examples
--------
::

    @_api.rename_parameter("3.1", "bad_name", "good_name")
    def func(good_name): ...
Matplotlib internal error: z cannot be a parameter for () must be a parameter for c                     > TU;   a7  [        TST< STR                   ST< ST S3	S9  UR                  T5      UT'   T" U 0 UD6$ )NzThe z parameter of z() has been renamed z since Matplotlib z:; support for the old name will be dropped in %(removal)s.r    )r-   r   pop)rb   rc   r   newoldr   s     r   r8   !rename_parameter.<locals>.wrapper  sh    &=cWN4==/ J$$'7*<UG DC DE !**S/F3KT$V$$r   )	r5   partialrename_parameterrj   	signature
parametersr   r6   
DECORATORS)r   r   r   r   	decoratorr   r8   s   ````   r   r   r      s    & !!"2E3DI|!!$'Ii*** 
%cW,G==/	* )&&& 
%cW,E==/	& __T% % $JwNr   c                       \ rS rSrS rSrg)_deprecated_parameter_classi2  c                     g)Nz<deprecated parameter>r   )rE   s    r   __repr__$_deprecated_parameter_class.__repr__3  s    'r   r   N)r   r   r	   r
   r   r   r   r   r   r   r   2  s    (r   r   c                   ^ ^^^^^	^
^^^ [         R                  " [        T T40 TD6nTc  U$ [        R                  " T5      m[        S TR                  R                  5        5       S5      mTTR                  ;   Ga  TR                  T   R                  nU[        R                  R                  L m	U[        R                  R                  L m
T	(       d  T
(       d  U[        R                  R                  L a  [        R                  O/ TR                  QR                  T5      mTR!                  TR                  R                  5        Vs/ s H(  nUR"                  T:X  a  UR!                  [$        S9OUPM*     snS9=Tl        mO7SmO4S=m	m
[        R                  mT(       d   ST< STR(                   S	35       eTR+                  S
S5      m[         R,                  " T5      UUU	U
UUUUUU 4
S j5       nU[.        U'   U$ s  snf )a  
Decorator indicating that parameter *name* of *func* is being deprecated.

The actual implementation of *func* should keep the *name* parameter in its
signature, or accept a ``**kwargs`` argument (through which *name* would be
passed).

Parameters that come after the deprecated parameter effectively become
keyword-only (as they cannot be passed positionally without triggering the
DeprecationWarning on the deprecated parameter), and should be marked as
such after the deprecation period has passed and the deprecated parameter
is removed.

Parameters other than *since*, *name*, and *func* are keyword-only and
forwarded to `.warn_deprecated`.

Examples
--------
::

    @_api.delete_parameter("3.1", "unused")
    def func(used_arg, other_arg, unused, more_args): ...
Nc              3      #    U  H;  nUR                   [        R                  R                  :X  d  M-  UR                  v   M=     g 7fr3   )kindrj   	ParameterVAR_KEYWORDr   ).0params     r   	<genexpr>#delete_parameter.<locals>.<genexpr>\  s6      H0Mu ::):):)F)FF #

0Ms
   ,AA)defaultr   Fr   r   r   r   c                  .  >
 [        U 5      T::  a  T
U;  a  T" U 0 UD6$ TR                  " U 0 UD6R                  nT(       a/  UR                  T
5      (       a  [	        TSTR
                   S3S9  OT(       a/  UR                  T
5      (       a  [	        TSTR
                   S3S9  Oh[        U
4S jX"R                  T	0 5      4 5       5      (       a=  ST
< S3n[	        T4[        T
5      STR
                   S	3T(       a  TS
-   U-   OUS.TD6  T" U 0 UD6$ )Nz#Additional positional arguments to zV() are deprecated since %(since)s and support for them will be removed in %(removal)s.r   z Additional keyword arguments to c              3   T   >#    U  H  nTU;   =(       a    UT   [         :g  v   M     g 7fr3   )_deprecated_parameter)r   dr   s     r   r   4delete_parameter.<locals>.wrapper.<locals>.<genexpr>  s/      GEQ ?qw*???Es   %(zIf any parameter follows z5, they should be passed as keyword, not positionally.parameter of r   rf   )r   r   r   )lenbind	argumentsgetr-   r   anyrepr)
inner_argsinner_kwargsr   deprecation_addendumr   r   
is_varargsis_varkwargsrc   kwargs_namer   name_idxr   r   s       r   r8   !delete_parameter.<locals>.wrappery  sJ   z?h&4|+C 4|44NNJ?,?II	)----!D==/ "C DE immD11!A==/ "C DE  G$mmK&DEG G G ,D8 4- . ! $Z(r:DL(S.+??2  Z0<00r   )r5   r   delete_parameterrj   r   nextr   valuesr   r   VAR_POSITIONALr   KEYWORD_ONLYmathinfindexreplacer   r   __signature__r   r   r6   r   )r   r   r   rc   r   r   r   r8   r   r   r   r   r   r   s   ````    @@@@@@r   r   r   :  s   2 !!"2E4J6JI|!!$'I  H	0D0D0K0K0M HIMOKy#####D)..W..===
w00<<<, !G$5$5$B$BB -y++,2248  .7->-> '1188:K< ;E ::% &;<+01:K<-> .= =D
 H$))
\88 	")$1J}}oR!	"{ zz*d+H__T1 1 1@ $JwNeK<s   /Hc           	      8  ^ ^^^ [         R                  " [        T T5      nTc  U$ [        R                  " T5      n[        R
                  R                  n[        R
                  R                  nTUR                  ;   a  UR                  T   R                  U:X  d   ST< STR                   S35       e/ UR                  QnUR                  T5      mUTS  Vs/ s H$  nUR                  U   R                  U:X  d  M"  UPM&     nn[         R                  " T5      UUUU 4S j5       n	UR                  UR                  R                  5        V
s/ s H$  n
U
R                  U;   a  U
R                  US9OU
PM&     sn
S9U	l        U["        U	'   U	$ s  snf s  sn
f )a  
Decorator indicating that passing parameter *name* (or any of the following
ones) positionally to *func* is being deprecated.

When used on a method that has a pyplot wrapper, this should be the
outermost decorator, so that :file:`boilerplate.py` can access the original
signature.
Nr   z/ must be a positional-or-keyword parameter for zx(). If this error happens on a function with a pyplot wrapper, make sure make_keyword_only() is the outermost decorator.c                  f   > [        U 5      T:  a  [        TSTSTR                   S3S9  T" U 0 UD6$ )NzPassing the %(name)s %(obj_type)s positionally is deprecated since Matplotlib %(since)s; the parameter will become keyword-only in %(removal)s.r   r   )r    r   r   )r   r-   r   )rb   rc   r   r   r   r   s     r   r8   "make_keyword_only.<locals>.wrapper  sI    
 t9x  E mDMM?"$E	G
 T$V$$r   )r   r   )r5   r   make_keyword_onlyrj   r   r   POSITIONAL_OR_KEYWORDr   r   r   r   r   r6   r   r   r   r   r   )r   r   r   r   r   POKKWOnameskwonlyr8   r   r   s   ```        @r   r   r     s    !!"3UDAI|!!$'I



1
1C



(
(CI((($$T*//36V
%dX . (T	UV 7
 $i""#E{{4 H$XY/ 9/t%%d+00C7 /F 9 __T
% 
% &--))002:42E $)::#73UB2:4- 5G $JwN+9":4s   !FF+F)allow_emptyc                   S nS nU R                   n[        X5      n[        U[        U5      5      (       a  [        U[        5      (       a  U OU R	                  U5      nXx:w  a_  U(       aF  [        [        USS5      SS5      UR
                  R                  UR
                  R                  4;  a  [        S0 USS.UED6  U$ g)	a  
Return ``obj.method`` with a deprecation if it was overridden, else None.

Parameters
----------
method
    An unbound method, i.e. an expression of the form
    ``Class.method_name``.  Remember that within the body of a method, one
    can always use ``__class__`` to refer to the class that is currently
    being defined.
obj
    Either an object of the class where *method* is defined, or a subclass
    of that class.
allow_empty : bool, default: False
    Whether to allow overrides by "empty" methods without emitting a
    warning.
**kwargs
    Additional parameters passed to `warn_deprecated` to generate the
    deprecation warning; must at least include the "since" key.
c                      g r3   r   r   r   r   empty(deprecate_method_override.<locals>.empty  s    r   c                      g)r\   Nr   r   r   r   empty_with_docstring7deprecate_method_override.<locals>.empty_with_docstring  s    r   __code__Nco_codemethod)r   r   r   )r   r~   rB   rh   rD   r   r   r-   )	r   r:   r   rc   r   r   r   bound_child
bound_bases	            r   deprecate_method_overrider     s    , )??D#$K k4;//JsD4I4I 	^^C   	! W[*dC&."^^331::BBDD 	I4XHHIr   c               #      #    [         R                  " 5          [         R                  " S[        5        S v   S S S 5        g ! , (       d  f       g = f7f)Nignore)warningscatch_warningssimplefilterr   r   r   r   'suppress_matplotlib_deprecation_warningr     s0     		 	 	"h(DE 
#	"	"s   A A	A
AA)r   r   r   Fr   r   r3   )r   
contextlibr5   rj   r   r   DeprecationWarningr   r&   r-   rt   rv   r   r   r   r   r   r   r   contextmanagerr   r   r   r   <module>r      s   
     I#5 I
 MO5 "52 22ub".Bb "$""er2yx > 
0f( (
 45 aH.b ;@ 'T  r   