Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeprecationWarning's from elasticsearch-py. #1558

Closed
wants to merge 1 commit into from

Conversation

arnau126
Copy link

@arnau126 arnau126 commented Jan 13, 2022

See elastic/elasticsearch-py#1698 for more information.
Fixes #1551 .

@cla-checker-service
Copy link

cla-checker-service bot commented Jan 13, 2022

💚 CLA has been signed

@arnau126 arnau126 force-pushed the master branch 6 times, most recently from 7de7a5f to feb9fcc Compare January 14, 2022 08:26
Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

Thanks for this, if we're making this change we need to make the minimum required elasticsearch package to be 7.14.0 as we're now using document= instead of body=.

@arnau126
Copy link
Author

arnau126 commented Jan 19, 2022

We can also do something like:

        if elasticsearch.__version__ >= (7, 14, 0):
            key = 'document'
        else:
            key = 'body'
        meta = es.index(
            index=self._get_index(index),
            **{key: self.to_dict(skip_empty=skip_empty)},
            **doc_meta
        )

@arnau126
Copy link
Author

arnau126 commented Oct 7, 2022

@sethmlarson Please, let me know if anything else is required.
(I've rebased the branch).

@anze3db
Copy link

anze3db commented Feb 24, 2023

Could we get a new release with this patch? We are drowning in deprecation warnings 😢

Happy to help if anything else needs to be done before the release, let me know!

@sethmlarson
Copy link
Contributor

Thanks for this, I've created a separate PR which fixed the deprecations for all APIs. The fix is available on v7.4.1 on PyPI.

@sethmlarson sethmlarson closed this Mar 1, 2023
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.

Getting deprecation warnings from es as they are preparing for next release
3 participants