
    ci                     `    d dl Z d dlmZmZ d dlmZ d dlZdedeedef   gedef   f   fdZy)    N)AnyCallable)_commonmessagereturn.c                 ,     dt         dt         f fd}|S )z<Decorator to show a deprecation warning once for a function.funcr   c                 t     dt        j                         dt        dt        dt        f fd       }|S )NFargskwargsr   c                     sdt        j                  t        d       t        j                         5  t        j                  dt
        j                          | i |cd d d        S # 1 sw Y   nxY w | i |S )NT   )
stacklevelignore)category)warningswarnDeprecationWarningcatch_warningssimplefilterr   ExperimentalWarning)r   r   r	   r   warning_dones     E/tmp/pip-target-z3e9_cxr/lib/python/vertexai/_genai/_logging_utils.pywrapperzAshow_deprecation_warning_once.<locals>.decorator.<locals>.wrapper   sx      #g'9aH ((* - %%h9T9TUT,V,	- - -
 (((s   -A--A6)	functoolswrapsr   )r	   r   r   r   s   ` @r   	decoratorz0show_deprecation_warning_once.<locals>.decorator   s?    			)3 	)# 	)# 	) 
	)     )r   )r   r   s   ` r   show_deprecation_warning_oncer      s    
  ( r   )	r   typingr   r   google.genair   r   strr    r   r   <module>r$      sG          xS!"HS#X$667r   