|
|
@ -44,6 +44,8 @@ def deprecated(update_to="", since="", reason=""):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def decorator(func):
|
|
|
|
def decorator(func):
|
|
|
|
|
|
|
|
# TODO(zhiqiu): We temporally disable the warnings for 2.0-bata, and it should be re-enabled in the future.
|
|
|
|
|
|
|
|
return func
|
|
|
|
"""construct warning message, and return a decorated function or class."""
|
|
|
|
"""construct warning message, and return a decorated function or class."""
|
|
|
|
assert isinstance(update_to, str), 'type of "update_to" must be str.'
|
|
|
|
assert isinstance(update_to, str), 'type of "update_to" must be str.'
|
|
|
|
assert isinstance(since, str), 'type of "since" must be str.'
|
|
|
|
assert isinstance(since, str), 'type of "since" must be str.'
|
|
|
|