Skip to content

Commit d2f7b93

Browse files
committed
addressed import errors for Python 3.10
1 parent e7bdefa commit d2f7b93

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="vpd",
10-
version="0.9.2",
10+
version="0.9.3",
1111
author="Drew Botwinick",
1212
author_email="[email protected]",
1313
description="VirtualPathDictChains. Hierarchical, Addressable Dicts, potentially using YaML",

vpd/cid.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
1717
"""
1818

19-
from collections import Mapping, MutableMapping, OrderedDict
19+
from collections import OrderedDict
20+
21+
try:
22+
from collections import Mapping, MutableMapping
23+
except ImportError:
24+
from collections.abc import Mapping, MutableMapping
2025

2126

2227
class CaseInsensitiveDict(MutableMapping):

vpd/cmp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# author: Drew Botwinick, Botwinick Innovations
22
# license: 3-clause BSD
33

4-
from collections import Mapping
4+
try:
5+
from collections import Mapping
6+
except ImportError:
7+
from collections.abc import Mapping
58

69
from .iterable import is_iterable
710

vpd/iterable.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# author: Drew Botwinick, Botwinick Innovations
22
# license: 3-clause BSD
3-
from collections import Mapping
3+
try:
4+
from collections import Mapping
5+
except ImportError:
6+
from collections.abc import Mapping
47

58
from six import string_types
69

@@ -12,8 +15,8 @@ def is_iterable(obj, strings=False, mappings=False, excluded_types=None):
1215
when checking if iterable), but option exists to include string-types to make this more accurate to its namesake.
1316
1417
:param obj: object to check
15-
:param strings: whether or not to consider strings as "iterable" for the purposes of this function
16-
:param mappings: whether or not to consider Mappings as "iterable" for the purposes of this function
18+
:param strings: whether to consider strings as "iterable" for the purposes of this function
19+
:param mappings: whether to consider Mappings as "iterable" for the purposes of this function
1720
:param excluded_types: callable single-arg function or iterable of other types to exclude from considering iterable
1821
:return: True if iterable
1922
"""

0 commit comments

Comments
 (0)