Skip to content

Commit

Permalink
DeprecationWarnings: more helpful message (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed authored and jpadilla committed Jun 12, 2017
1 parent 6f19288 commit 639fa01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jwt/api_jws.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def decode(self, jws, key='', verify=True, algorithms=None, options=None,
key, algorithms)
else:
warnings.warn('The verify parameter is deprecated. '
'Please use options instead.', DeprecationWarning)
'Please use verify_signature in options instead.',
DeprecationWarning)

return payload

Expand Down
3 changes: 2 additions & 1 deletion jwt/api_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def _validate_claims(self, payload, options, audience=None, issuer=None,
if 'verify_expiration' in kwargs:
options['verify_exp'] = kwargs.get('verify_expiration', True)
warnings.warn('The verify_expiration parameter is deprecated. '
'Please use options instead.', DeprecationWarning)
'Please use verify_exp in options instead.',
DeprecationWarning)

if isinstance(leeway, timedelta):
leeway = timedelta_total_seconds(leeway)
Expand Down

0 comments on commit 639fa01

Please sign in to comment.