{"action":"created","issue":{"url":"https://api.github.com/repos/progrium/pyjwt/issues/60","labels_url":"https://api.github.com/repos/progrium/pyjwt/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/progrium/pyjwt/issues/60/comments","events_url":"https://api.github.com/repos/progrium/pyjwt/issues/60/events","html_url":"https://github.com/progrium/pyjwt/pull/60","id":53429176,"number":60,"title":"Add base exception for invalid tokens","user":{"login":"wbolster","id":748944,"avatar_url":"https://avatars.githubusercontent.com/u/748944?v=3","gravatar_id":"","url":"https://api.github.com/users/wbolster","html_url":"https://github.com/wbolster","followers_url":"https://api.github.com/users/wbolster/followers","following_url":"https://api.github.com/users/wbolster/following{/other_user}","gists_url":"https://api.github.com/users/wbolster/gists{/gist_id}","starred_url":"https://api.github.com/users/wbolster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbolster/subscriptions","organizations_url":"https://api.github.com/users/wbolster/orgs","repos_url":"https://api.github.com/users/wbolster/repos","events_url":"https://api.github.com/users/wbolster/events{/privacy}","received_events_url":"https://api.github.com/users/wbolster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-05T18:52:16Z","updated_at":"2015-01-06T15:52:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/progrium/pyjwt/pulls/60","html_url":"https://github.com/progrium/pyjwt/pull/60","diff_url":"https://github.com/progrium/pyjwt/pull/60.diff","patch_url":"https://github.com/progrium/pyjwt/pull/60.patch"},"body":"Fixes #59."},"comment":{"url":"https://api.github.com/repos/progrium/pyjwt/issues/comments/68883218","html_url":"https://github.com/progrium/pyjwt/pull/60#issuecomment-68883218","issue_url":"https://api.github.com/repos/progrium/pyjwt/issues/60","id":68883218,"user":{"login":"wbolster","id":748944,"avatar_url":"https://avatars.githubusercontent.com/u/748944?v=3","gravatar_id":"","url":"https://api.github.com/users/wbolster","html_url":"https://github.com/wbolster","followers_url":"https://api.github.com/users/wbolster/followers","following_url":"https://api.github.com/users/wbolster/following{/other_user}","gists_url":"https://api.github.com/users/wbolster/gists{/gist_id}","starred_url":"https://api.github.com/users/wbolster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbolster/subscriptions","organizations_url":"https://api.github.com/users/wbolster/orgs","repos_url":"https://api.github.com/users/wbolster/repos","events_url":"https://api.github.com/users/wbolster/events{/privacy}","received_events_url":"https://api.github.com/users/wbolster/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T15:52:34Z","updated_at":"2015-01-06T15:52:34Z","body":"The problem with the `DeprecationWarning` is not pyjwt itself, since it would not use deprecated API internally. The decorator approach you pointed at would only work for code creating instances of the exception, which in the pyjwt case would only be pyjwt itself. That means there's not point using it. (Or maybe I'm not getting it...)\r\n\r\nThe problem is that application code that does sth like this:\r\n\r\n```python\r\ntry:\r\n    jwt.decode(...)\r\nexcept jwt.InvalidIssuer:\r\n    handle_error()\r\n```\r\n\r\n...only mentions the `jwt.InvalidIssuer` symbol, but doesn't call any method on it, so there's no way a `DeprecationWarning` can be sneaked in."}}