deprecate#

Deprecate Arguments.

Functions:

deprecate_arguments(old_args, new_args, version)

Deprecate multiple arguments (possibly grouped) and automatically replace them with new ones.

deprecate_function(version[, new_func, ...])

Decorator to mark a function as deprecated.

ansys.fluent.core.utils.deprecate.deprecate_arguments(old_args, new_args, version, converter=None, warning_cls=<class 'ansys.fluent.core.pyfluent_warnings.PyFluentDeprecationWarning'>)#

Deprecate multiple arguments (possibly grouped) and automatically replace them with new ones.

Parameters:
old_argsstr | list[str]

Old argument name(s) to deprecate.

new_argsstr | list[str]

New argument name(s) to use instead.

versionstr

The version in which the arguments were deprecated.

convertercallable(), optional

Custom converter function taking (kwargs, old_args, new_args) and returning modified kwargs. If not provided, a default converter is used.

warning_clswarnings, optional

The warning class to use for deprecation warnings.

Returns:
Callable

The decorated function.

Raises:
ValueError

For arguments mismatch.

ansys.fluent.core.utils.deprecate.deprecate_function(version, new_func=None, warning_cls=<class 'ansys.fluent.core.pyfluent_warnings.PyFluentDeprecationWarning'>)#

Decorator to mark a function as deprecated.

Parameters:
versionstr

Version in which this function was deprecated.

new_funcstr, optional

Name of the new/replacement function to use.

warning_clstype[Warning], optional

Warning class to use for the deprecation warning.

Returns:
Callable

The decorated function.