Replace deprecated import of ABCs from collections

ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.
This replaces that deprecated usage mentioned in method descriptions.

Change-Id: I6864c6d84407ed9512917266ccb06a51bab5714a
This commit is contained in:
Takashi Kajinami 2021-07-22 19:38:06 +09:00
parent 70114c829e
commit 10c230618f
1 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ class ElasticsearchClient(object):
:param instruction: instruction to execute for each term
:type instruction: dict
:param terms: list of terms for which instruction should be executed
:type terms: collections.Iterable
:type terms: collections.abc.Iterable
:rtype: requests.models.Response
"""
instruction = json.dumps(instruction)
@ -256,7 +256,7 @@ class ElasticsearchClient(object):
"""Indexes each of the documents in 'terms'
:param terms: list of documents to index
:type terms: collections.Iterable
:type terms: collections.abc.Iterable
"""
LOG.debug("Indexing {} documents".format(len(terms)))
return self.bulk_with_instruction({"index": {}}, terms)