Skip to content

Commit

Permalink
import iterable from collection.abc instead of collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Narendra-Neerukonda committed Jun 18, 2021
1 parent b21c507 commit ed55b37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyhive/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
from past.builtins import basestring
from pyhive import exc
import abc
import collections
import time
import datetime
from future.utils import with_metaclass
from itertools import islice
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable


class DBAPICursor(with_metaclass(abc.ABCMeta, object)):
Expand Down Expand Up @@ -245,7 +248,7 @@ def escape_item(self, item):
return self.escape_number(item)
elif isinstance(item, basestring):
return self.escape_string(item)
elif isinstance(item, collections.Iterable):
elif isinstance(item, Iterable):
return self.escape_sequence(item)
elif isinstance(item, datetime.datetime):
return self.escape_datetime(item, self._DATETIME_FORMAT)
Expand Down

0 comments on commit ed55b37

Please sign in to comment.