Skip to content

Commit 639fa01

Browse files
blueyedjpadilla
authored andcommitted
DeprecationWarnings: more helpful message (jpadilla#270)
1 parent 6f19288 commit 639fa01

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

jwt/api_jws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ def decode(self, jws, key='', verify=True, algorithms=None, options=None,
126126
key, algorithms)
127127
else:
128128
warnings.warn('The verify parameter is deprecated. '
129-
'Please use options instead.', DeprecationWarning)
129+
'Please use verify_signature in options instead.',
130+
DeprecationWarning)
130131

131132
return payload
132133

jwt/api_jwt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def _validate_claims(self, payload, options, audience=None, issuer=None,
8282
if 'verify_expiration' in kwargs:
8383
options['verify_exp'] = kwargs.get('verify_expiration', True)
8484
warnings.warn('The verify_expiration parameter is deprecated. '
85-
'Please use options instead.', DeprecationWarning)
85+
'Please use verify_exp in options instead.',
86+
DeprecationWarning)
8687

8788
if isinstance(leeway, timedelta):
8889
leeway = timedelta_total_seconds(leeway)

0 commit comments

Comments
 (0)