From c8c28dcd1184938ac5eda6bcd8d459cff4f74cc5 Mon Sep 17 00:00:00 2001 From: thijs-hakkenberg <97637552+thijs-hakkenberg@users.noreply.github.com> Date: Wed, 6 Sep 2023 01:28:57 +0200 Subject: [PATCH] Update base.py I received an error that the module collections did not have 'iterable'. in the last version of the code, indeed this was the case. Hopeful this may prevent import issues of others as well --- wordpress_xmlrpc/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wordpress_xmlrpc/base.py b/wordpress_xmlrpc/base.py index d2f4f83..0455851 100644 --- a/wordpress_xmlrpc/base.py +++ b/wordpress_xmlrpc/base.py @@ -1,4 +1,4 @@ -import collections +from collections.abc import Iterable import sys from wordpress_xmlrpc.compat import xmlrpc_client, dict_type @@ -126,7 +126,7 @@ def process_result(self, raw_result): if self.results_class and raw_result: if isinstance(raw_result, dict_type): return self.results_class(raw_result) - elif isinstance(raw_result, collections.Iterable): + elif isinstance(raw_result, Iterable): return [self.results_class(result) for result in raw_result] return raw_result