a
    |P_                     @   s@   d Z ddlZzddlmZmZ W n ey2   Y n0 dd ZdS )z& Utility module to deprecate features     N)AnyCallablec                    s@   z
 j }W n ty$    jj }Y n0 d|  fdd}|S )z Return a function that warns it is deprecated by another function.

        Returns a new function that warns it is deprecated by function
        ``func``, then acts as a pass-through wrapper for ``func``.

    zUse %s insteadc                     s   t jtdd  | i |S )N   )
stacklevel)warningswarnDeprecationWarning)argskwargsfuncZwarn_msg 4/usr/lib/python3/dist-packages/debian/deprecation.pydeprecated_func0   s    z/function_deprecated_by.<locals>.deprecated_func)__name__AttributeError__func__)r   Z	func_namer   r   r   r   function_deprecated_by#   s    
r   )__doc__r   typingr   r   ImportErrorr   r   r   r   r   <module>   s   