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 in tests #461

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Support pyjwt >= 2 in tests #461

merged 1 commit into from
Nov 30, 2021

Conversation

diego-plan9
Copy link
Contributor

Allow the tests to be aware of the pyjwt version installed, converting the result of jwt.encode() from bytes to string and vice-versa accordingly as the return type changes between pyjwt versions.

Details

It seems that pyjwt changed the return type between major versions, and running the tests with pyjwt>=2.0 seems to result in #432 (I have been able to replicate the same errors). Even if mwoauth still pins 1.7.x (although might be able to use 2.x ) and as a result 2.x is never really installed in CI or a regular install, this PR tries to follow-up on the (guessed) rationale of #402 and #420 and allow running the test suite to support pyjwt 2.x.

Allow the tests to be aware of the `pyjwt` version installed, converting
the result of `jwt.encode()` from bytes to string and vice-versa
accordingly as the return type changes between pyjwt versions.
@welcome
Copy link

welcome bot commented Oct 4, 2021

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@consideRatio
Copy link
Member

@rragundez as the author of #402 with relevant background knowledge, would you be willing to help out with a review on this PR?

Thank you @diego-plan9 and @rragundez for your contributions! ❤️ 🎉

@minrk minrk merged commit beb31a4 into jupyterhub:master Nov 30, 2021
@diego-plan9 diego-plan9 deleted the feature/pyjwt-2-tests branch November 30, 2021 14:29
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

3 participants