Skip to content

Conversation

@bshakur8
Copy link

in Python3.11, when stats_only is False, it returns a tuple of (success, errors) instead of only list of errors.
The fix makes sure that it returns a tuple when stats_only is True and list otherwise.

Legacy:

elasticsearch/_async/helpers.py:348
return success, failed if stats_only else errors

will return, <success>, errors in case stats_only is False./

in Python3.11, when <stats_only> is False, it returns a tuple of (<success>, <errors>)
instead of only list of <errors>.
The fix makes sure that it returns a tuple when <stats_only> is True
and list otherwise.
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cla-checker-service
Copy link

cla-checker-service bot commented Apr 30, 2023

❌ Author of the following commits did not sign a Contributor Agreement:
61a9bd1

Please, read and sign the above mentioned agreement if you want to contribute to this project

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes no difference:

>>> ("1", "2") if True else "3"
('1', '2')
>>> "1", "2" if True else "3"
('1', '2')

@pquentin pquentin closed this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants