From d8353f98e1c2111881e821a7826b7250bf470fab Mon Sep 17 00:00:00 2001 From: Tzeusy Date: Fri, 5 Jul 2024 00:12:29 +0800 Subject: [PATCH] Hotfix: Fix collections.Iterable import, deprecated per Python 3.10 --- 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 50802bf..5ef1b7d 100644 --- a/consulate/models/base.py +++ b/consulate/models/base.py @@ -3,10 +3,13 @@ Base Model """ -import collections +try: + from collections import Iterable # noqa +except ImportError: + from collections.abc 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