Decorator which warns the developer about methods that are pending deprecation.
param new_func: | The new class, method, or function that should be used. |
---|---|
type new_func: | str |
@PendingDeprecation("new_func")
def old_func():
pass
# prints the warning:
# `old_func` is pending deprecation. Please use `new_func` instead.
PendingDeprecation
(object)¶Decorator which warns the developer about methods that are pending deprecation.
Parameters: | new_func (str) – The new class, method, or function that should be used. |
---|
@PendingDeprecation("new_func")
def old_func():
pass
# prints the warning:
# `old_func` is pending deprecation. Please use `new_func` instead.
__init__
(self, new_func)¶