hikari.internal.deprecation#

Deprecation utils.

Module Contents#

hikari.internal.deprecation.check_if_past_removal(what, /, *, removal_version)[source]#

Check if a deprecation is passed its removal version.

Parameters:
whatstr

What is being deprecated.

Other Parameters:
removal_versionstr

The version it will be removed in.

Raises:
DeprecationWarning

If the deprecated item is past its removal version.

hikari.internal.deprecation.warn_deprecated(what, /, *, removal_version, additional_info, stack_level=3, quote=True)[source]#

Issue a deprecation warning.

If the item is past its deprecation version, an error will be raised instead.

Parameters:
whatstr

What is being deprecated.

Other Parameters:
removal_versionstr

The version it will be removed in.

additional_infostr

Additional information on the deprecation for the user.

stack_levelint

The stack level to issue the warning in.

quotebool

Whether to quote what when displaying the deprecation

Raises:
DeprecationWarning

If the deprecated item is past its removal version.