From 0ebace143854c94dece090fd83baeb9d45757c03 Mon Sep 17 00:00:00 2001 From: Matsumoto Ruko <38883252+gsq7474741@users.noreply.github.com> Date: Mon, 5 Dec 2022 11:54:11 +0800 Subject: [PATCH] remove deprecated warnings for py36 (#48639) --- python/paddle/utils/deprecated.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/python/paddle/utils/deprecated.py b/python/paddle/utils/deprecated.py index 7854f12aa9..cd9e6947b7 100755 --- a/python/paddle/utils/deprecated.py +++ b/python/paddle/utils/deprecated.py @@ -23,14 +23,6 @@ import paddle __all__ = [] -# NOTE(zhiqiu): Since python 3.2, DeprecationWarning is ignored by default, -# and since python 3.7, it is once again shown by default when triggered directly by code in __main__. -# See details: https://docs.python.org/3/library/warnings.html#default-warning-filter -# The following line set DeprecationWarning to show once, which is expected to work in python 3.2 -> 3.6 -# However, doing this could introduce one samll side effect, i.e., the DeprecationWarning which is not issued by @deprecated. -# The side effect is acceptable, and we will find better way to do this if we could. -warnings.simplefilter('default', DeprecationWarning) - def deprecated(update_to="", since="", reason="", level=0): """Decorate a function to signify its deprecation. -- GitLab