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.
This commit is contained in:
kreutz-hs 2018-11-02 12:24:18 +01:00 committed by José Padilla
parent 72fb76e461
commit 2122f94432
3 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added ### Added
- Support for Python 3.7
[v1.6.4][1.6.4] [v1.6.4][1.6.4]
------------------------------------------------------------------------- -------------------------------------------------------------------------
### Fixed ### Fixed

View File

@ -1,8 +1,12 @@
import json import json
import warnings import warnings
from calendar import timegm from calendar import timegm
from collections import Iterable, Mapping
from datetime import datetime, timedelta 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: try:
# import required by mypy to perform type checking, not used for normal execution # import required by mypy to perform type checking, not used for normal execution
from typing import Callable, Dict, List, Optional, Union # NOQA from typing import Callable, Dict, List, Optional, Union # NOQA

View File

@ -15,4 +15,4 @@ commands =
deps = deps =
flake8 flake8
flake8-import-order flake8-import-order
pep8-naming pep8-naming