From 2c2c5d556b1452d5048557932a229a1f85fe8b13 Mon Sep 17 00:00:00 2001 From: Alberto Vara Date: Fri, 24 May 2024 17:10:47 +0200 Subject: [PATCH] Fix Python3.11 collections import --- consulate/models/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/consulate/models/base.py b/consulate/models/base.py index 172c61c..4ca58a6 100644 --- a/consulate/models/base.py +++ b/consulate/models/base.py @@ -2,10 +2,13 @@ Base Model """ -import collections +try: + from collections.abc import Iterable # noqa +except ImportError: + from collections import Iterable # noqa -class Model(collections.Iterable): +class Model(Iterable): """A model contains an __attribute__ map that defines the name, its type for type validation, an optional validation method, a method used to