From 61a9bd1c201f26adaa01500e86f68648eb6b945c Mon Sep 17 00:00:00 2001 From: Bhaa Shakur Date: Sun, 30 Apr 2023 14:21:01 +0300 Subject: [PATCH] helpers.async_bulk to return explicit tuple. in Python3.11, when is False, it returns a tuple of (, ) instead of only list of . The fix makes sure that it returns a tuple when is True and list otherwise. --- elasticsearch/_async/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/_async/helpers.py b/elasticsearch/_async/helpers.py index 6e05bc9fc..afe692dc3 100644 --- a/elasticsearch/_async/helpers.py +++ b/elasticsearch/_async/helpers.py @@ -345,7 +345,7 @@ async def async_bulk( else: success += 1 - return success, failed if stats_only else errors + return (success, failed) if stats_only else errors async def async_scan(