From c641ba6d0546d99a7a130e0c709a50da838175c1 Mon Sep 17 00:00:00 2001 From: Matthew Stedman <46506801+MattStedman@users.noreply.github.com> Date: Mon, 6 Dec 2021 06:36:35 +0800 Subject: [PATCH 1/2] Update path.py Fix for later versions of Python with "ImportError: cannot import name 'MutableSequence' from 'collections'' error. --- svgpath/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svgpath/path.py b/svgpath/path.py index 51d4b6a..1ea1206 100644 --- a/svgpath/path.py +++ b/svgpath/path.py @@ -1,6 +1,6 @@ from __future__ import division from math import sqrt, cos, sin, acos, degrees, radians, log -from collections import MutableSequence +from collections.abc import MutableSequence # This file contains classes for the different types of SVG path segments as # well as a Path object that contains a sequence of path segments. From ad60cd3f710c4762a0be0fac175867ec60fb10ab Mon Sep 17 00:00:00 2001 From: Matthew Stedman Date: Tue, 7 Dec 2021 10:40:55 +0800 Subject: [PATCH 2/2] added import exception for collections.abc/collections --- svgpath/path.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/svgpath/path.py b/svgpath/path.py index 1ea1206..6e1448d 100644 --- a/svgpath/path.py +++ b/svgpath/path.py @@ -1,6 +1,9 @@ from __future__ import division from math import sqrt, cos, sin, acos, degrees, radians, log -from collections.abc import MutableSequence +try: + from collections.abc import MutableSequence +except ImportError: + from collections import MutableSequence # This file contains classes for the different types of SVG path segments as # well as a Path object that contains a sequence of path segments.