o
    …ÚãaÍ  ã                   @   s@   d Z ddlZz
ddlmZmZ W n	 ey   Y nw 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w 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©ÚfuncÚ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   Ú	func_namer   r   r   r   Úfunction_deprecated_by#   s   
ÿr   )Ú__doc__r   Útypingr   r   ÚImportErrorr   r   r   r   r   Ú<module>   s   þ