(message: str, *, action: str = "always")
Show a deprecation warning, optionally filtered.

    Args:
        message: Message to display with ``DeprecationWarning``.
        action: Filter controlling whether warning is ignored, displayed, or turned
            into an error. For reference:

    See Also:
        https://docs.python.org/3/library/warnings.html#the-warnings-filter
Show a deprecation warning, optionally filtered.
Show a deprecation warning optionally filtered .
def deprecated(message: str, *, action: str = "always"):
    """
    Show a deprecation warning, optionally filtered.

    Args:
        message: Message to display with ``DeprecationWarning``.
        action: Filter controlling whether warning is ignored, displayed, or turned
            into an error. For reference:

    See Also:
        https://docs.python.org/3/library/warnings.html#the-warnings-filter
    """
    with warnings.catch_warnings():
        warnings.simplefilter(action, DeprecationWarning)
        warnings.warn(message, DeprecationWarning, stacklevel=2)
def deprecated ( message : str , * , action : str = "always" ) : with warnings . catch_warnings ( ) : warnings . simplefilter ( action , DeprecationWarning ) warnings . warn ( message , DeprecationWarning , stacklevel = 2 )