From b531b564de6f1babe1b2fc04970e3a1fb0f9613c Mon Sep 17 00:00:00 2001 From: Thierry Viaccoz <42694303+viaccoz@users.noreply.github.com> Date: Wed, 27 Sep 2023 19:00:41 +0200 Subject: [PATCH] Update utils.py Change collections.Iterable to collections.abc.Iterable to make it compatible with newer Python versions. As stated in https://docs.python.org/3/library/collections.abc.html: New in version 3.3: Formerly, this module was part of the collections module. --- pdfindex/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdfindex/utils.py b/pdfindex/utils.py index 3267ab3..23dc3f6 100644 --- a/pdfindex/utils.py +++ b/pdfindex/utils.py @@ -5,8 +5,8 @@ def flatten(l): for el in l: - if isinstance(el, collections.Iterable) and not isinstance(el, str): + if isinstance(el, collections.abc.Iterable) and not isinstance(el, str): for sub in flatten(el): yield sub else: - yield el \ No newline at end of file + yield el