Skip to content

Commit

Permalink
Support Python 3.7
Browse files Browse the repository at this point in the history
 * 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.
  • Loading branch information
kreutz-hs committed Sep 28, 2018
1 parent d3ffeab commit b8f9f39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ matrix:
env: TOXENV=flake8,py35-crypto,py35-nocrypto,py35-contrib_crypto
- python: 3.6
env: TOXENV=flake8,py36-crypto,py36-nocrypto,py36-contrib_crypto
- python: 3.7
env: TOXENV=flake8,py37-crypto,py37-nocrypto,py37-contrib_crypto
before_install:
- sudo apt-get install python3-pip # required to install mypy
install:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion jwt/api_jwt.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
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
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,34,35,36}-crypto, py{27,35,36}-contrib_crypto, py{27,35,36}-nocrypto, flake8
envlist = py{27,34,35,36,37}-crypto, py{27,35,36,37}-contrib_crypto, py{27,35,36,37}-nocrypto, flake8

[testenv]
commands =
Expand All @@ -15,4 +15,4 @@ commands =
deps =
flake8
flake8-import-order
pep8-naming
pep8-naming

0 comments on commit b8f9f39

Please sign in to comment.