Skip to content

Commit 0382823

Browse files
authored
Merge pull request #18 from gmacon/python-3.10-collections
Support Python 3.10
2 parents f9b5d7f + a0dea53 commit 0382823

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/bap/adt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ def count_authors(library):
182182
183183
"""
184184

185-
from collections import Iterable,Sequence,Mapping
185+
try:
186+
from collections.abc import Iterable,Sequence,Mapping
187+
except ImportError:
188+
from collections import Iterable,Sequence,Mapping
186189

187190
class ADT(object):
188191
"""Algebraic Data Type.

src/bap/bir.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
"""BIR - BAP Intermediate Representation"""
44

5-
from collections import Sequence,Mapping
5+
try:
6+
from collections.abc import Sequence,Mapping
7+
except ImportError:
8+
from collections import Sequence,Mapping
69
from .adt import *
710
from .bil import *
811
from . import noeval_parser

0 commit comments

Comments
 (0)