Skip to main content

Callable

Decorator for deprecated functions.

A deprecation warning will be emitted when the function is called.

def Callable(
deprecation: str = None,
removal: str = None,
alternative: str = None,
description: str = None
) - > function

Decorator for deprecated functions.

Parameters

NameTypeDescription
deprecationstr = NoneThe version string that marks the first deprecation; if omitted, a PendingDeprecationWarning is emitted.
removalstr = NoneThe future version string indicating when the feature is scheduled for removal.
alternativestr = NoneInstructions or guidance for an alternative solution to replace the deprecated functionality.
descriptionstr = NoneA description of the specific feature being deprecated; defaults to the qualified name of the function.

Returns

TypeDescription
functionA wrapper function that emits a deprecation warning before executing the original callable.