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.',
) Callable[source]#

Add a DeprecationWarning to a function.

Deprecated since version 4.0.0: This function is deprecated and will be removed in a future release. Use warnings.deprecated instead.

Parameters:
funccallable

The function to decorate with a DeprecationWarning.

messagestr, optional

The warning message to present.

Notes

The final warning message is formatted using str.format, e.g message.format(func), so you can use attribute references to the function itself. See the default message as an example.