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

fix: make collections import compatible across Python versions #419

Merged
merged 3 commits into from Jan 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/auth/jwt.py
Expand Up @@ -40,7 +40,7 @@

"""

import collections
import collections.abc
import copy
import datetime
import json
Expand Down Expand Up @@ -215,7 +215,7 @@ def decode(token, certs=None, verify=True, audience=None):

# If certs is specified as a dictionary of key IDs to certificates, then
# use the certificate identified by the key ID in the token header.
if isinstance(certs, collections.Mapping):
if isinstance(certs, collections.abc.Mapping):
key_id = header.get("kid")
if key_id:
if key_id not in certs:
Expand Down