deprecated()¶
- audeer.deprecated(*, removal_version, alternative=None)[source]¶
Mark code as deprecated.
Provide a decorator to mark functions/classes as deprecated.
You have to specify the version, for which the deprecated code will be removed. If you change only small things like renaming a function or an argument, it will be fine to remove the code with the next minor release (X.(Y+1).Z). Otherwise, choose the next major release ((X+1).Y.Z).
- Parameters
- Return type
Examples
>>> @deprecated(removal_version="2.0.0") ... def deprecated_function(): ... pass