summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkreutz-hs <43569762+kreutz-hs@users.noreply.github.com>2018-11-02 12:24:18 +0100
committerJosé Padilla <jpadilla@webapplicate.com>2018-11-02 07:24:18 -0400
commit2122f94432d160a23e79a4771c05d71132dc6db9 (patch)
treec0eac2884d684aff101142cc66cac0d4e3c81e17
parent72fb76e46152aa5ed92c87143809ddd677c4f12d (diff)
downloadpyjwt-2122f94432d160a23e79a4771c05d71132dc6db9.tar.gz
Support Python 3.7 (#375)
* Import collection ABC's from correct module They were moved into collections.abc in 3.3 and will be deprecated from collections in 3.8.
-rw-r--r--CHANGELOG.md2
-rw-r--r--jwt/api_jwt.py6
-rw-r--r--tox.ini2
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 747267b..86e16ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
+- Support for Python 3.7
+
[v1.6.4][1.6.4]
-------------------------------------------------------------------------
### Fixed
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py
index 6caeecf..0836ec0 100644
--- a/jwt/api_jwt.py
+++ b/jwt/api_jwt.py
@@ -1,9 +1,13 @@
import json
import warnings
from calendar import timegm
-from collections import Iterable, Mapping
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:
diff --git a/tox.ini b/tox.ini
index 5b78ba8..3c93faa 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,4 +15,4 @@ commands =
deps =
flake8
flake8-import-order
- pep8-naming \ No newline at end of file
+ pep8-naming