elasticsearch-dsl-py
elasticsearch-dsl-py copied to clipboard
Fix DeprecationWarning's from elasticsearch-py.
See https://github.com/elastic/elasticsearch-py/issues/1698 for more information. Fixes #1551 .
💚 CLA has been signed
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
)
@sethmlarson Please, let me know if anything else is required. (I've rebased the branch).
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!
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.