From a04acc47c5faa1688e20ae8cced06aabc287cfbd Mon Sep 17 00:00:00 2001 From: imlison Date: Mon, 14 Dec 2020 09:13:08 +0800 Subject: [PATCH] fixed `deprecated` decorator --- src/masonite/helpers/misc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/masonite/helpers/misc.py b/src/masonite/helpers/misc.py index 70cc9f7a9..39d90fa42 100644 --- a/src/masonite/helpers/misc.py +++ b/src/masonite/helpers/misc.py @@ -105,6 +105,8 @@ def __new__(cls, *args): def deprecated(message): + warnings.simplefilter("default", DeprecationWarning) + def deprecated_decorator(func): def deprecated_func(*args, **kwargs): warnings.warn( @@ -112,7 +114,6 @@ def deprecated_func(*args, **kwargs): category=DeprecationWarning, stacklevel=2, ) - warnings.simplefilter("default", DeprecationWarning) return func(*args, **kwargs) return deprecated_func