deprecated_function#
- gwpy.utils.decorators.deprecated_function(
- func: Callable | None = None,
- message: str = '{0.__module__}.{0.__name__} has been deprecated, and will be removed in a future release.',
Add a
DeprecationWarningto a function.Deprecated since version 4.0.0: This function is deprecated and will be removed in a future release. Use
warnings.deprecatedinstead.- Parameters:
- func
callable The function to decorate with a
DeprecationWarning.- message
str, optional The warning message to present.
- func
Notes
The final warning message is formatted using
str.format, e.gmessage.format(func), so you can use attribute references to the function itself. See the default message as an example.