pulse2percept.utils.deprecation

deprecated, is_deprecated

Functions

is_deprecated(func) Helper to check if func is wrapped by the deprecated decorator

Classes

deprecated([alt_func, deprecated_version, …]) Decorator to mark deprecated functions and classes with a warning.
class pulse2percept.utils.deprecation.deprecated(alt_func=None, deprecated_version=None, removed_version=None)[source]

Decorator to mark deprecated functions and classes with a warning.

Parameters:
  • alt_func (str) – If given, tell user what function to use instead.
  • deprecated_version (float or str) – The package version in which the function/class was first marked as deprecated.
  • removed_version (float or str) – The package version in which the deprecated function/class will be removed.
pulse2percept.utils.deprecation.is_deprecated(func)[source]

Helper to check if func is wrapped by the deprecated decorator