
    Χg                         d Z ddlZddlZddlZddlmZmZ ddlmZ  ed          Z	 ed          Z
deded	ed
eee
e	f         gee
e	f         f         fdZdS )z"Utility for deprecating functions.    N)CallableTypeVar)	ParamSpec_T_Psince
removed_ininstructionsreturnc                      dt           t          t          f         dt           t          t          f         f fd}|S )aF  Marks functions as deprecated.

    It will result in a warning when the function is called and a note in the
    docstring.

    Args:
        since: The version when the function was first deprecated.
        removed_in: The version when the function will be removed.
        instructions: The action users should take.
    functionr   c           	          t          j                   dt          j        dt          j        dt
          f 	
fd            } j        pd}t          j        d
 d	 d d	          }|	                    d
d          }t          |          dk    r |\  }}t          j        |          }|d
||g}n|d         }|d
|g}d                    |          |_        |S )Nargskwargsr   c                      t          j        dj         dj         d d d dt          d            | i |S )N'.z' is deprecated in version z and will be removed in z	. Please    )category
stacklevel)warningswarn
__module____name__FutureWarning)r   r   r   r
   r	   r   s     S/var/www/html/ai-engine/env/lib/python3.11/site-packages/torch/onnx/_deprecation.pywrapperz.deprecated.<locals>.decorator.<locals>.wrapper   s    MCH' C C(*; C C,1C C(C C3?C C C '    8T,V,,,     z            .. deprecated:: z;
                Deprecated and will be removed in version z.
                Please z.
            z

   r   )	functoolswrapsr   r   r   r   __doc__textwrapdedentsplitlenjoin)r   r   	docstringdeprecation_notesummary_and_bodysummarybodynew_docstring_partsr
   r	   r   s   `       r   	decoratorzdeprecated.<locals>.decorator   s;   		"	"	-27 	-bi 	-B 	- 	- 	- 	- 	- 	- 	- 	- 
#	"	- $*	 $?" ;E  %  
 
 %??6155  1$$,MGT ?4((D#3VWd"K&q)G#3VW"E''"566r   )r   r   r   )r   r	   r
   r/   s   ``` r   
deprecatedr0      sV    *HRV, *"b&1A * * * * * * * *X r   )r#   r!   r$   r   typingr   r   typing_extensionsr   r   r   strr0    r   r   <module>r5      s    ( (       $ $ $ $ $ $ $ $ ' ' ' ' ' ' WT]]Yt__:::/2:xB (2r6"223: : : : : :r   