
    -i                     F    S SK r S SKrS SKJr  S/r " S S5      rS rS rg)    N)	signature
deprecatedc                   :    \ rS rSrSrS
S jrS rS rS rS r	Sr
g	)r      aa  Decorator to mark a function or class as deprecated.

Issue a warning when the function is called/the class is instantiated and
adds a warning to the docstring.

The optional extra argument will be appended to the deprecation message
and the docstring. Note: to use this with the default value for extra, put
in an empty of parentheses:

Examples
--------
>>> from sklearn.utils import deprecated
>>> deprecated()
<sklearn.utils.deprecation.deprecated object at ...>
>>> @deprecated()
... def some_function(): pass

Parameters
----------
extra : str, default=''
      To be added to the deprecation messages.
c                     Xl         g )Nextra)selfr	   s     L/var/www/html/venv/lib/python3.13/site-packages/sklearn/utils/deprecation.py__init__deprecated.__init__&   s    
    c                     [        U[        5      (       a  U R                  U5      $ [        U[        5      (       a  U R	                  U5      $ U R                  U5      $ )z0Call method

Parameters
----------
obj : object
)
isinstancetype_decorate_classproperty_decorate_property_decorate_fun)r
   objs     r   __call__deprecated.__call__)   sS     c4  '',,X&& **3//%%c**r   c                    ^^ SUR                   -  mU R                  (       a  TSU R                  -  -  mUR                  m[        U5      nUU4S jnX1l        SUl         TUl        X!l        U$ )NzClass %s is deprecated; %sc                    > [         R                  " T[        S9  T[        R                  L a  [        R	                  U 5      $ T" U /UQ70 UD6$ N)category)warningswarnFutureWarningobject__new__)clsargskwargsmsgnews      r   wrapped+deprecated._decorate_class.<locals>.wrappedF   sA    MM#6fnn$~~c**s,T,V,,r   r"   )__name__r	   r"   r   deprecated_original__signature__)r
   r#   sigr(   r&   r'   s       @@r   r   deprecated._decorate_class>   sd    &5::6DJJ&&Ckkn	- $&)#
r   c                    ^^ STR                   -  mU R                  (       a  TSU R                  -  -  m[        R                  " T5      UU4S j5       nTUl        U$ )zDecorate function funzFunction %s is deprecatedr   c                  F   > [         R                  " T[        S9  T" U 0 UD6$ r   )r   r   r    )r$   r%   funr&   s     r   r(   )deprecated._decorate_fun.<locals>.wrapped]   s!    MM#6'''r   )r*   r	   	functoolswraps__wrapped__)r
   r1   r(   r&   s    ` @r   r   deprecated._decorate_funV   sW     *CLL8::6DJJ&&C			( 
	( "r   c                    ^^ U R                   m[        [        R                  " TR                  5      UU4S j5       5       nU$ )Nc                  Z   > [         R                  " T[        S9  TR                  " U 0 UD6$ r   )r   r   r    fget)r$   r%   r&   props     r   r(   .deprecated._decorate_property.<locals>.wrappedk   s'     MM#699d-f--r   )r	   r   r3   r4   r9   )r
   r:   r(   r&   s    ` @r   r   deprecated._decorate_propertyh   s:    jj			#	. 
$ 
	. r   r   N) )r*   
__module____qualname____firstlineno____doc__r   r   r   r   r   __static_attributes__ r   r   r   r      s     4+*0$	r   c           
          [        U S/ 5      nUc  / nSSR                  U Vs/ s H0  n[        UR                  [        5      (       d  M$  UR                  PM2     sn5      ;   nU$ s  snf )z>Helper to check if func is wrapped by our deprecated decorator__closure__r   r=   )getattrjoinr   cell_contentsstr)funcclosurescis_deprecateds       r   _is_deprecatedrN   t   sc    t]B/H BGG"*O(Qj#.N(O% M  	Ps   #A%

A%
c                 p    U S:w  a+  [         R                  " S[        5        Ub  [        S5      eU $ Uc  gU$ )zCHelper to deprecate force_all_finite in favor of ensure_all_finite.r   zX'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8.zb'force_all_finite' and 'ensure_all_finite' cannot be used together. Pass `ensure_all_finite` only.T)r   r   r    
ValueError)force_all_finiteensure_all_finites     r   _deprecate_force_all_finiterS      sO    <'	
 (1 
   r   )r3   r   inspectr   __all__r   rN   rS   rC   r   r   <module>rV      s.      .f fRr   