diff options
author | Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> | 2018-11-26 00:28:26 +0900 |
---|---|---|
committer | José Padilla <jpadilla@webapplicate.com> | 2018-11-25 10:28:26 -0500 |
commit | 30d4c5a7f91e2425211b51c479f2f1e7a37f98b9 (patch) | |
tree | 1c3a0bec154d47aaed6f555e484af34ffdcc42c3 /jwt/api_jwt.py | |
parent | 2122f94432d160a23e79a4771c05d71132dc6db9 (diff) | |
download | pyjwt-30d4c5a7f91e2425211b51c479f2f1e7a37f98b9.tar.gz |
Import collection ABC's from correct module (#384)
* Move ABCs imports to compat.py to reuse the imports from other modules
* Import collection ABC's from correct module
Diffstat (limited to 'jwt/api_jwt.py')
-rw-r--r-- | jwt/api_jwt.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py index 0836ec0..85504ac 100644 --- a/jwt/api_jwt.py +++ b/jwt/api_jwt.py @@ -3,11 +3,6 @@ import warnings from calendar import timegm from datetime import datetime, timedelta try: - # Importing ABCs from collections will be removed in PY3.8 - from collections.abc import Iterable, Mapping -except ImportError: - from collections import Iterable, Mapping -try: # import required by mypy to perform type checking, not used for normal execution from typing import Callable, Dict, List, Optional, Union # NOQA except ImportError: @@ -15,7 +10,7 @@ except ImportError: from .api_jws import PyJWS from .algorithms import Algorithm, get_default_algorithms # NOQA -from .compat import string_types +from .compat import Iterable, Mapping, string_types from .exceptions import ( DecodeError, ExpiredSignatureError, ImmatureSignatureError, InvalidAudienceError, InvalidIssuedAtError, |