Fix deprecation warning for Python 3.7
- Done so while still retaining 2.7 support.
Fixes #31
Tommy Yu
4 years ago
3 | 3 | """ |
4 | 4 | |
5 | 5 | from itertools import chain |
6 | from collections import Iterable | |
6 | try: | |
7 | from collections.abc import Iterable | |
8 | except ImportError: # pragma: no cover | |
9 | from collections import Iterable | |
7 | 10 | from calmjs.parse.asttypes import Node |
8 | 11 | from calmjs.parse import sourcemap |
9 | 12 | from calmjs.parse.exceptions import ECMASyntaxError |