Skip to content

Commit 2c2c5d5

Browse files
authored
Fix Python3.11 collections import
1 parent 9d95a94 commit 2c2c5d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

consulate/models/base.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Base Model
33
44
"""
5-
import collections
5+
try:
6+
from collections.abc import Iterable # noqa
7+
except ImportError:
8+
from collections import Iterable # noqa
69

710

8-
class Model(collections.Iterable):
11+
class Model(Iterable):
912
"""A model contains an __attribute__ map that defines the name,
1013
its type for type validation, an optional validation method, a method
1114
used to

0 commit comments

Comments
 (0)