From c82856fb5ad9cfcffe467d70966ed43029c1239c Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 21 Jun 2023 20:15:47 +0200 Subject: [PATCH] Fix for Python 3.10 and newer Signed-off-by: Stefan Weil --- ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py index c713bd6..945f8a1 100644 --- a/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py +++ b/ocrd_repair_inconsistencies/ocrd_repair_inconsistencies.py @@ -1,7 +1,12 @@ from __future__ import absolute_import import os.path -from collections import Sequence +try: + from collections import Sequence +except ImportError: + # With Python 3.10 Sequence has been moved to collections.abc. + from collections.abc import Sequence + from ocrd import Processor from ocrd_modelfactory import page_from_file