
    (Gg                         d dl Z d dlZd dlmZmZmZmZmZmZ  G d de	      Z
 ededef         Z edee         Zd	d	d
dededededeegef   f
dZdededededeegef   f
dZy)    N)AnyCallableTypeTypeVarUnioncastc                       e Zd Zy)LangGraphDeprecationWarningN)__name__
__module____qualname__     w/home/kushmeetdev/apache_webroot/langgraph_flaskproject/venv/lib/python3.12/site-packages/langgraph/_api/deprecation.pyr
   r
      s    r   r
   F.)boundC )removalexamplesincealternativer   r   returnc                l     dt         t        t        f   dt         t        t        f   f fd}|S )Nobjr   c           	          	r	nd} j                    d
 d| d d 	t         t              r~ j                  t	        j
                        dt        dt        dd ffd	       }| _        d

 d d} j                  r|d j                   z   }| _        t        t               S t               rot	        j
                         dt        dt        dt        f fd       }d
 d d} j                  r|d j                   z   }||_        t        t        |      S t        dt                d      )Nza future versionz is deprecated as of version z and will be removed in z. Use z	 instead.argskwargsr   c                 V    t        j                  t        d        | g|i | y N   )
stacklevelwarningswarnr
   )selfr   r   messageoriginal_inits      r   new_initz/deprecated.<locals>.decorator.<locals>.new_init   s&    g'BqQd4T4V4r   z7**Deprecated**: This class is deprecated as of version z. Use `z
` instead.z

c                  L    t        j                  t        d        | i |S r    r#   )r   r   r'   r   s     r   wrapperz.deprecated.<locals>.decorator.<locals>.wrapper,   s$    g'BqQD+F++r   z:**Deprecated**: This function is deprecated as of version zACan only add deprecation decorator to classes or callables, got 'z
' instead.)r   
isinstancetype__init__	functoolswrapsr   __doc__r   r   callabler   	TypeError)r   removal_strr)   	docstringr+   r'   r(   r   r   r   r   s   `    @@r   	decoratorzdeprecated.<locals>.decorator   s   !(g.@||n9% A&-vk])G9N 	 c4 LLM__]+5c 5S 5T 5 ,5 $CL J% Q#}J0  {{%$s{{m(<<	#CK3<c]__S!,s ,c ,c , ",
 MUG T#}J0  {{%$s{{m(<<	'GO7##STXY\T]S^^hi r   )r   r   r   )r   r   r   r   r6   s   ```` r   
deprecatedr7      s4    ,uQT{ ,uQT{ , ,\ r   arg_namec                8     dt         dt         f fd}|S )Nfuncr   c                 h     t        j                          fd       }t        t        |      S )Nc                      |v r6t        j                  d dj                   d d d dt        d        | i |S )	NzParameter 'z' in function 'z' is deprecated as of version z  and will be removed in version z. Use 'z' parameter instead.r!   )categoryr"   )r$   r%   r   r
   )r   r   r   r8   r:   r   r   s     r   r+   z8deprecated_parameter.<locals>.decorator.<locals>.wrapperF   si    6!!(?4==/ J005w6VW^V_ `'=(<> 9  (((r   )r/   r0   r   r   )r:   r+   r   r8   r   r   s   ` r   r6   z'deprecated_parameter.<locals>.decoratorE   s-    				) 
		) Awr   )r   )r8   r   r   r   r6   s   ```` r   deprecated_parameterr>   B   s#       a     r   )r/   r$   typingr   r   r   r   r   r   DeprecationWarningr
   r   r   strr7   r>   r   r   r   <module>rB      s      < <	"4 	 CxS)*CtCy! 57r11 1.11AD1qc1f1h,/=@qc1fr   