warn_deprecated
- warn_deprecated(*, deprecated_qual_name_usage: str, new_qual_name_usage: str, to_be_removed_in_version: str, stacklevel: int = 2) None [source]
Raise deprecation warning with change information.
The change information are old / new usage information and end of support version.
- Parameters:
deprecated_qual_name_usage (str) – Old usage with fully qualified name e.g.:
'glotaran.read_model_from_yaml(model_yml_str)'
new_qual_name_usage (str) – New usage as fully qualified name e.g.:
'glotaran.io.load_model(model_yml_str, format_name="yml_str")'
to_be_removed_in_version (str) – Version the support for this usage will be removed.
stacklevel (int) – Stack at which the warning should be shown as raise. Default: 2
- Raises:
OverDueDeprecation – If the current version is greater or equal to
to_be_removed_in_version
.