From 8e3d36ed7069418aaef434dca3ae47b4beb3c171 Mon Sep 17 00:00:00 2001 From: Michael Arnold Date: Mon, 14 Aug 2023 16:52:18 -0400 Subject: [PATCH 1/2] Update helper.py for python >3.10 compatibility resolves an API change to python's collections module. --- shifterator/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shifterator/helper.py b/shifterator/helper.py index c68730d..4663db8 100755 --- a/shifterator/helper.py +++ b/shifterator/helper.py @@ -1,4 +1,7 @@ -import collections +try: + from collections.abc import Mapping +except ImportError: + from collections import Mapping import pkgutil From 1237446e5819e314a479ae34cd67ef4edad8042c Mon Sep 17 00:00:00 2001 From: Michael Arnold Date: Mon, 14 Aug 2023 16:54:33 -0400 Subject: [PATCH 2/2] Update helper.py --- shifterator/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shifterator/helper.py b/shifterator/helper.py index 4663db8..e189cad 100755 --- a/shifterator/helper.py +++ b/shifterator/helper.py @@ -156,7 +156,7 @@ def get_score_dictionary(scores): type2score: dict Keys are types and values are scores of those types """ - if isinstance(scores, collections.Mapping): + if isinstance(scores, Mapping): return scores.copy(), None # Else, load scores from predefined score file in shifterator