diff --git a/vector/base.py b/vector/base.py index 7fa559c..c22a295 100644 --- a/vector/base.py +++ b/vector/base.py @@ -1,6 +1,10 @@ import operator from contextlib import contextmanager -from collections import Iterable +try: + # since python 3.10 + from collections.abc import Iterable +except ImportError: + from collections import Iterable class View: def draw(self, object, offset=None, **kw): diff --git a/vector/svg.py b/vector/svg.py index be5930d..25cb673 100644 --- a/vector/svg.py +++ b/vector/svg.py @@ -2,7 +2,11 @@ from contextlib import contextmanager from . import base from math import sin, cos, radians -from collections import Iterable +try: + # since python 3.10 + from collections.abc import Iterable +except ImportError: + from collections import Iterable from urllib.parse import urlunparse, ParseResult import operator from textwrap import TextWrapper