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

Add PyJWT 2.0.0 support (most are not effected) #349

Closed
wants to merge 2 commits into from

Conversation

Andrew-Chen-Wang
Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang commented Dec 24, 2020

SimpleJWT 4.6.0 already support sPyJWT 2.0.0. Investigation just shows that we merged PRs for the alpha versions ahead of time, but our CI wasn't using the alpha versions so the tests never failed until the mature 2.0.0 came out. Tests just failed, but a quick adjustment to the tests without adjustments to the actual library shows everything passing.

  • Many tests relied on passing a payload into encode and changing it payload by reference. In PyJWT 2.0.0, the payload is copied (dict.copy()).
  • Verify was deprecated in favor of using the option verify_signature. This is reflected in backends.py. Unless you wrote verify=False, you are not effected by this change as we will continue to use the verify keyword.

* Many tests relied on passing a payload into encode and changing it payload by reference. In PyJWT 2.0.0, the payload is copied (`dict.copy()`).
* Verify was deprecated in favor of using the option verify_signature. This is reflected in backends.py. Unless you wrote verify=False, you are not effected by this change.
allanlewis added a commit to allanlewis/django-rest-framework-simplejwt that referenced this pull request Jan 12, 2021
Commit 073d83c added initial support for PyJWT>=2.0.0a1; full support for
PyJWT>=2.0.0 should come with jazzband#349. However, we should still support PyJWT v1,
at least the latest v1.7.1. This commit therefore adds axes to tox to test
against both versions.
allanlewis added a commit to allanlewis/django-rest-framework-simplejwt that referenced this pull request Jan 12, 2021
Commit 073d83c added initial support for PyJWT>=2.0.0a1; full support for
PyJWT>=2.0.0 should come with jazzband#349. However, we should still support PyJWT v1,
at least the latest v1.7.1. This commit therefore adds axes to tox to test
against both versions.
@Andrew-Chen-Wang
Copy link
Member Author

@catalincoroeanu Only other maintainers can merge to master (so if David made a PR, I would have to merge). If you don't mind merging this PR, that'd be great!

@Andrew-Chen-Wang
Copy link
Member Author

Superseded.

@Andrew-Chen-Wang Andrew-Chen-Wang deleted the support-jwt-2 branch February 22, 2021 15:52
allanlewis added a commit to allanlewis/django-rest-framework-simplejwt that referenced this pull request Feb 23, 2021
Commit 073d83c added initial support for PyJWT>=2.0.0a1; full support for
PyJWT>=2.0.0 should come with jazzband#349. However, we should still support PyJWT v1,
at least the latest v1.7.1. This commit therefore adds axes to tox to test
against both versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant