Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit fec158e

Browse files
authored
Fix broken Python 2 build (#453)
f2c1298 accidentally broke the build as collections.abc is only available in Python 3.x. This commit adds a workaround that enables the import that works both on 2 and 3.
1 parent f2c1298 commit fec158e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/cloudant/_common_util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919

2020
import sys
2121
import platform
22-
from collections.abc import Sequence
2322
import json
2423

2524
from ._2to3 import LONGTYPE, STRTYPE, NONETYPE, UNITYPE, iteritems_
2625
from .error import CloudantArgumentError, CloudantException, CloudantClientException
2726

27+
try:
28+
from collections.abc import Sequence
29+
except ImportError:
30+
from collections import Sequence
31+
2832
# Library Constants
2933

3034
USER_AGENT = '/'.join([

0 commit comments

Comments
 (0)