
    Mh)	                     L    d dl Z d dlZ G d de          Z G d d          ZdS )    Nc                       e Zd ZdZdS )jupyterlab_deprecationz`Create our own deprecation class, since Python >= 2.7
    silences deprecations by default.
    N)__name__
__module____qualname____doc__     P/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/jupyterlab/utils.pyr   r      s          	Dr
   r   c                        e Zd ZdZddZd ZdS )
deprecateda  Decorator to mark deprecated functions with warning.
    Adapted from `scikit-image/skimage/_shared/utils.py`.

    Parameters
    ----------
    alt_func : str
        If given, tell user what function to use instead.
    behavior : {'warn', 'raise'}
        Behavior during call to deprecated function: 'warn' = warn user that
        function is deprecated; 'raise' = raise error.
    removed_version : str
        The package version in which the deprecated function will be removed.
    Nwarnc                 0    || _         || _        || _        d S )N)alt_funcbehaviorremoved_version)selfr   r   r   s       r   __init__zdeprecated.__init__   s      .r
   c                     d} j         d j          d}d} j        
d j         }j        |z   dz   |z   }d| dt          j                   fd            }d	|z   }|j        ||_        n|d
z   |j        z   |_        |S )N z Use ``z`` instead.z  and will be removed in version .zFunction ``z`` is deprecatedc                      j         dk    rLj        }t          j        dt                     t          j        t          |j        |j        dz              nj         dk    rt	                     | i |S )Nr   always   )categoryfilenamelinenoraise)r   __code__warningssimplefilterr   warn_explicitco_filenameco_firstlineno)argskwargs	func_codefuncmsgr   s      r   wrappedz$deprecated.__call__.<locals>.wrapped/   s    }&& M	%h0FGGG&3&2$3a7	     ')),S1114((((r
   z**Deprecated function**.z

    )r   r   r   	functoolswrapsr   )r   r(   alt_msgrmv_msgfunction_descriptionr*   docr)   s   ``     @r   __call__zdeprecated.__call__$   s    =$::::G+O9MOOG#}w6<wFB0BBB				) 	) 	) 	) 	) 	) 
		) )72?"!GOO!J.@GOr
   )Nr   N)r   r   r   r   r   r1   r	   r
   r   r   r      sA         / / / /
! ! ! ! !r
   r   )r+   r    Warningr   r   r	   r
   r   <module>r3      sx        	 	 	 	 	W 	 	 	5 5 5 5 5 5 5 5 5 5r
   