
     hh                     F    d dl Z d dlZdgZddZ G d d          Zd	dZdS )
    N_deprecated   c                       fd}|S )z2Deprecate a function by emitting a warning on use.c                      t           t                    r1t          j        d                               t
          d            S t          j                    fd            } j        |_        |S )NzTrying to deprecate class {!r}r   category
stacklevelc                  L    t          j        t                      | i |S )Nr   )warningswarnDeprecationWarning)argskwargsfunmsgr	   s     R/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/scipy/_lib/deprecation.pycallz'_deprecated.<locals>.wrap.<locals>.call   s9    M#(:%/1 1 1 13''''    )	
isinstancetyper   r   formatRuntimeWarning	functoolswraps__doc__)r   r   r   r	   s   ` r   wrapz_deprecated.<locals>.wrap	   s    c4   	M077<<'A7 7 7 7 J				( 	( 	( 	( 	( 	( 
		( {r    )r   r	   r   s   `` r   r   r      s)          Kr   c                   $    e Zd ZdZd Zd Zd ZdS )_DeprecationHelperStrz3
    Helper class used by deprecate_cython_api
    c                 "    || _         || _        d S N)_content_message)selfcontentmessages      r   __init__z_DeprecationHelperStr.__init__   s    r   c                 *    t          | j                  S r!   )hashr"   )r$   s    r   __hash__z_DeprecationHelperStr.__hash__#   s    DM"""r   c                 b    | j         |k    }|r!t          j        | j        t          d           |S )Nr   r   )r"   r   r   r#   r   )r$   otherress      r   __eq__z_DeprecationHelperStr.__eq__&   s>    }% 	(M$-2D%&( ( ( (
r   N)__name__
__module____qualname__r   r'   r*   r.   r   r   r   r   r      sK              # # #    r   r   c                 r   d                     | j        |          }|d|z  }n	d|d|d}||d|z   z  }| j        }d}d	}	 d                     ||          }	|	|v r.d
}|                    |	          |t	          |	|          <   |dz  }nnJ|s(|                    |          |t	          ||          <   dS dS )a>  
    Deprecate an exported cdef function in a public Cython API module.

    Only functions can be deprecated; typedefs etc. cannot.

    Parameters
    ----------
    module : module
        Public Cython API module (e.g. scipy.linalg.cython_blas).
    routine_name : str
        Name of the routine to deprecate. May also be a fused-type
        routine (in which case its all specializations are deprecated).
    new_name : str
        New name to include in the deprecation warning message
    message : str
        Additional text in the deprecation warning message

    Examples
    --------
    Usually, this function would be used in the top-level of the
    module ``.pyx`` file:

    >>> from scipy._lib.deprecation import deprecate_cython_api
    >>> import scipy.linalg.cython_blas as mod
    >>> deprecate_cython_api(mod, "dgemm", "dgemm_new",
    ...                      message="Deprecated in Scipy 1.5.0")
    >>> del deprecate_cython_api, mod

    After this, Cython modules that use the deprecated function emit a
    deprecation warning when they are imported.

    z{}.{}Nz`%s` is deprecated!`z` is deprecated, use `z
` instead!
r   FTz__pyx_fuse_{}{}   )r   r/   __pyx_capi__popr   )
moduleroutine_namenew_namer&   old_namedepdocdj	has_fused
fused_names
             r   deprecate_cython_apirA   .   s   B ~~fo|<<H&1  ((HHH& $. A 	
AI&--a>>
??I;<55;L;LA#J778FAA  M9:|9L9L
f
5
5666M Mr   )r   )NN)r   r   __all__r   r   rA   r   r   r   <module>rC      s        /   (       &<M <M <M <M <M <Mr   