deprecated#

mufasa.utils.decorators.deprecated(reason: str, removal_version: str = None)[source]#

Mark a function or class as deprecated.

Parameters:
  • reason (str) – Explanation of why it is deprecated and what to use instead.

  • removal_version (str, optional) – Expected version when it will be removed.

Returns:

The decorated function with a deprecation warning.

Return type:

function

Examples

>>> @deprecated("Use 'new_function' instead.", "2.0.0")
>>> def old_function():
>>>     pass