deprecation_utils

Helper functions to give deprecation warnings.

Functions

Summary

check_overdue

Check if a deprecation is overdue for removal.

check_qualnames_in_tests

Test that qualnames import path exists when running tests.

deprecate

Decorate a function, method or class to deprecate it.

deprecate_dict_entry

Replace dict entry inplace and warn about usage change, if present in the dict.

deprecate_module_attribute

Import and return and anttribute from the new location.

deprecate_submodule

Create a module at runtime which retrieves attributes from new module.

glotaran_version

Version of the distribution.

module_attribute

Import and return the attribute (e.g. function or class) of a module.

parse_version

Parse version string to tuple of three ints for comparison.

raise_deprecation_error

Raise GlotaranDeprectedApiError error, with formatted message.

warn_deprecated

Raise deprecation warning with change information.

Exceptions

Exception Summary

GlotaranApiDeprecationWarning

Warning to give users about API changes.

GlotaranDeprecatedApiError

Exception raised when a deprecation has no replacement.

OverDueDeprecation

Error thrown when a deprecation should have been removed.