
    =h                     8    d dl Z d dlZ G d de      Zd ZddZy)    Nc                       e Zd ZdZy)ObsoleteExceptionz0Base class for warnings about obsolete features.N)__name__
__module____qualname____doc__     d/var/www/html/phonemate/phone_mate_backend/venv/lib/python3.12/site-packages/twilio/base/obsolete.pyr   r      s    :r
   r   c                 B     t        j                          fd       }|S )zThis is a decorator which can be used to mark Client classes as
    obsolete. It will result in an error being emitted when the class is
    instantiated.c                  L    t        dj                  j                              )Nzi{} has been removed from this version of the library. Please refer to current documentation for guidance.)r   formatr   )argskwargsfuncs     r   new_funcz!obsolete_client.<locals>.new_func   s$    BBH&BW
 	
r
   	functoolswraps)r   r   s   ` r   obsolete_clientr   	   s'    
 __T
 
 Or
   c                 8      fd}t               r |       S |S )z
    This is a decorator which can be used to mark deprecated methods.
    It will report in a DeprecationWarning being emitted to stderr when the deprecated method is used.
    c                 F     t        j                          fd       }|S )Nc                      dj                  j                        }|t        t              rdj                        ndz  }t	        j
                  |t                | i |S )Nz#Function method .{}() is deprecatedz in favor of .{}() )r   r   
isinstancestrwarningswarnDeprecationWarning)r   r   msgr   r   s      r   wrapperzEdeprecated_method.<locals>.deprecated_method_wrapper.<locals>.wrapper   s_    7>>t}}MCh, %++H5C
 MM#12(((r
   r   )r   r!   r   s   ` r   deprecated_method_wrapperz4deprecated_method.<locals>.deprecated_method_wrapper   s%    			) 
	) r
   )callable)r   r"   s   ` r   deprecated_methodr$      s#     (22$$r
   )N)r   r   	Exceptionr   r   r$   r	   r
   r   <module>r&      s!     ;	 ;%r
   