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:
parent
72fb76e461
commit
2122f94432
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue