We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d833182 commit 3519817Copy full SHA for 3519817
twilio/jwt/access_token/grants.py
@@ -10,13 +10,11 @@ def deprecated(func):
10
11
@functools.wraps(func)
12
def new_func(*args, **kwargs):
13
- warnings.warn_explicit(
14
- "Call to deprecated function {}.".format(func.__name__),
15
- category=DeprecationWarning,
16
- filename=func.func_code.co_filename,
17
- lineno=func.func_code.co_firstlineno + 1
18
- )
+ warnings.simplefilter('always', DeprecationWarning)
+ warnings.warn("Call to deprecated function {}.".format(func.__name__), category=DeprecationWarning, stacklevel=2)
+ warnings.simplefilter('default', DeprecationWarning)
19
return func(*args, **kwargs)
+
20
return new_func
21
22
0 commit comments