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

Refactor jwt/jwks_client.py without requests dependency #546

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Refactor jwt/jwks_client.py without requests dependency #546

merged 1 commit into from
Dec 17, 2020

Conversation

jdufresne
Copy link
Contributor

Allows dropping a dependency that isn't very necessary.

The requests library was used for a single line of code. This same code
is just as easily expressible using the stdlib, thus alllows removing a
dependency.

Tests were adjusted to mock this new approach.

Allows dropping a dependency that isn't very necessary.

The requests library was used for a single line of code. This same code
is just as easily expressible using the stdlib, thus alllows removing a
dependency.

Tests were adjusted to mock this new approach.
@jpadilla jpadilla added this to the v2.0.0 milestone Dec 17, 2020
r = requests.get(self.uri)
return r.json()
with urllib.request.urlopen(self.uri) as response:
return json.load(response)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 heh this was so much easier than all the cruft I had added.

@jpadilla jpadilla merged commit fef427b into jpadilla:master Dec 17, 2020
@jdufresne jdufresne deleted the drop-requests branch December 17, 2020 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants