nvflare.fuel.utils.deprecated module
- deprecated(reason)[source]
This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used.
- warn_deprecated(message: str, stacklevel: int = 2)[source]
Issue a DeprecationWarning once per process for each unique message.
stacklevelfollows the same convention aswarnings.warn(): 2 (the default) points at the direct caller ofwarn_deprecated. Pass 3 when calling from inside an__init__so the warning location is the code that instantiates the class rather than the__init__body.