Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PyJWT 2.0.0 #536

Merged
merged 2 commits into from Jan 10, 2021

Conversation

shaib
Copy link
Contributor

@shaib shaib commented Dec 30, 2020

Proposed changes

The release of PyJWT 2.0.0 last week included some backwards-incompatible changes.
This adapts some tests and the Azure backends to support the new release (while still supporting the older 1.7.1 version).

One suggestion to solve the problems was to pin PyJWT down to 1.7.1 (that is #532).
The issue was also discussed a little in #503.

Types of changes

Please check the type of change your PR introduces:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (PEP8, lint, formatting, renaming, etc)
  • Refactoring (no functional changes, no api changes)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build related changes (build process, tests runner, etc)
  • Other (please describe):

Checklist

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

(The tests are failing before this PR. It fixes them)
(One test has been freezing for me locally; I thought it may have been an issue with my setup, but I've seen that it froze in CI as well. I skipped it locally, after verifying that it freezes the same way with either PyJWT 1.7.1 or 2.0.0. The skipping is done in
3809cd1 which is part of the followup PR of tentative changes #537)

Additional information

This PR is made on behalf of Matific -- https://www.matific.com -- https://github.com/SlateScience

The new version changed `jwt.encode()` to return a str
instead of a bytes. The change preserves compatibility
with both new and older PyJWT
This takes care of two changes:
- The name ExpiredSignature, deprecated in favor of ExpiredSignatureError,
  was dropped
- `jwt.decode(verify=False)` needs to be rephrased as
  `jwt.decode(options={'verify_signature': False})`
@shaib shaib mentioned this pull request Dec 30, 2020
9 tasks
@omab omab merged commit 06548ef into python-social-auth:master Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants