
    4[g                         d dl mZmZ d dlZd dlZd dlmZ dgZ e       Z	dddZ
ddZ G d d	      Zdd
ZddddZy)    )	Parameter	signatureN)import_module_deprecated)correct_modulec                    |	d|  d| }nd|  }||vrt        d|  d| d| d|  d| d      t        t        |      |d      }|d| d	| d
|  d| d	}n!d|  d| d| d|  d| d|  d| d| d|  d| d}t        j                  |t
        d       |D ]  }	 t        t        d|  d|       |      c S  y# t         $ r}	||d   k(  r|	Y d}	~	;d}	~	ww xY w)a  Helper function for deprecating modules that are public but were
    intended to be private.

    Parameters
    ----------
    sub_package : str
        Subpackage the module belongs to eg. stats
    module : str
        Public but intended private module to deprecate
    private_modules : list
        Private replacement(s) for `module`; should contain the
        content of ``all``, possibly spread over several modules.
    all : list
        ``__all__`` belonging to `module`
    attribute : str
        The attribute in `module` being accessed
    correct_module : str, optional
        Module in `sub_package` that `attribute` should be imported from.
        Default is that `attribute` should be imported from ``scipy.sub_package``.
    Nzscipy..z`scipy.z` has no attribute `z`; furthermore, `scipy.z3` is deprecated and will be removed in SciPy 2.0.0.zPlease import `z` from the `z` namespace; the `scipy.z=` namespace is deprecated and will be removed in SciPy 2.0.0.z&` is deprecated along with the `scipy.z` namespace. `scipy.z2` will be removed in SciPy 1.14.0, and the `scipy.z+` namespace will be removed in SciPy 2.0.0.   category
stacklevel)AttributeErrorgetattrr   warningswarnDeprecationWarning)
sub_packagemoduleprivate_modulesall	attributer   correct_importattrmessagees
             Q/var/www/html/bid-api/venv/lib/python3.12/site-packages/scipy/_lib/deprecation.py_sub_module_deprecationr      s{   , !!+a/?@!+/k]!F8+?	{ K##.-q 923
 	
 =0)TBDi[^4D E%ax 023 	 k]!F81YK 8%ax 0!]!F81YK 8//:m1VH E./ 	 MM'$61E!	=6+ax)HI9UU "  	 ,,	s   B::	C
CCc                       fd}|S )z2Deprecate a function by emitting a warning on use.c                      t         t              r!t        j                  d t        d        S t        j                          fd       } j                  |_        |S )NzTrying to deprecate class    r   c                  L    t        j                  t                | i |S )Nr   )r   r   r   )argskwargsfunmsgr   s     r   callz'_deprecated.<locals>.wrap.<locals>.callW   s'    MM#(:%/1'''    )
isinstancetyper   r   RuntimeWarning	functoolswraps__doc__)r%   r'   r&   r   s   ` r   wrapz_deprecated.<locals>.wrapP   s\    c4 MM,SG4'A7 J			( 
	( {{r(    )r&   r   r/   s   `` r   r   r   N   s     Kr(   c                   "    e Zd ZdZd Zd Zd Zy)_DeprecationHelperStrz3
    Helper class used by deprecate_cython_api
    c                      || _         || _        y N)_content_message)selfcontentr   s      r   __init__z_DeprecationHelperStr.__init__f   s    r(   c                 ,    t        | j                        S r4   )hashr5   )r7   s    r   __hash__z_DeprecationHelperStr.__hash__j   s    DMM""r(   c                 t    | j                   |k(  }|r&t        j                  | j                  t        d       |S )Nr!   r   )r5   r   r   r6   r   )r7   otherress      r   __eq__z_DeprecationHelperStr.__eq__m   s0    }}%MM$--2D%&(
r(   N)__name__
__module____qualname__r.   r9   r<   r@   r0   r(   r   r2   r2   b   s     #r(   r2   c                 &   | j                    d| }|d|z  }n	d| d| d}||d|z   z  }| j                  }d}d	}	 d| | }	|	|v r&d
}|j                  |	      |t        |	|      <   |dz  }nn3|s|j                  |      |t        ||      <   yy)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.

    r	   Nz`%s` is deprecated!`z` is deprecated, use `z
` instead!
r   FT__pyx_fuse_   )rA   __pyx_capi__popr2   )
r   routine_namenew_namer   old_namedepdocdj	has_fused
fused_names
             r   deprecate_cython_apirS   u   s    B //"!L>2H&1XJ4XJjI$. A 	
AI
"1#l^4
?I;<55;LA#J78FA  9:|9L
f
56 r(   )versionc                D    d}t        |      fd}|  ||       S |S )a  Decorator for methods that issues warnings for positional arguments.

    Using the keyword-only argument syntax in pep 3102, arguments after the
    * will issue a warning when passed as a positional argument.

    Parameters
    ----------
    func : callable, default=None
        Function to check arguments on.
    version : callable, default=None
        The version when positional arguments will result in error.
    z9Need to specify a version where signature will be changedc                 p    t               g g j                  j                         D ]c  \  }}|j                  t        j
                  k(  rj                  |       5|j                  t        j                  k(  sSj                  |       e t        j                          fd       }|S )Nc                  n   t        |       t              z
  }|dk  r | i |S t        d | | | d        D cg c]  \  }}| d|  }}}dj                  |      }t        j                  d| d
 dt
        d       |j                  t        	j                  |               d	i |S c c}}w )
Nr   =z, zYou are passing z^ as a positional argument. Please change your invocation to use keyword arguments. From SciPy z@, passing these as positional arguments will result in an error.r!   )r   r0   )lenzipjoinr   r   r   update
parameters)r#   r$   
extra_argsnameargargs_msgall_argsfkwonly_argssigrT   s         r   inner_fzU_deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f   s    TS]2JQ$)&))
 "%[*%=tZKL?Q!R!RID# &#!R   yy*HMM&xj 1"") +99
 #	 MM#cnnd34;v;!s   B1)
r   r]   itemskindr   POSITIONAL_OR_KEYWORDappendKEYWORD_ONLYr,   r-   )rc   r_   paramrf   rb   rd   re   rT   s   `   @@@r    _inner_deprecate_positional_argszD_deprecate_positional_args.<locals>._inner_deprecate_positional_args   s    l>>//1KD%zzY<<<%y555""4(	 2 
		 
	0 r(   )
ValueError)funcrT   r&   rm   s    `  r   _deprecate_positional_argsrp      s8     Io$L /55++r(   )r!   )NNr4   )inspectr   r   r,   r   	importlibr   __all__object_NoValuer   r   r2   rS   rp   r0   r(   r   <module>rv      sP    (   # /
 8 7;=@( &;M@:,T :,r(   