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

Deprecation warning for positional arguments in ElasticSearch Python module #132

Open
drotheram opened this issue Oct 13, 2021 · 3 comments

Comments

@drotheram
Copy link
Contributor

from elastic/elasticsearch-py#1698:

Which APIs are effected?

All APIs will emit deprecation warnings for positional argument use in 7.15.0.

The following APIs will start emitting deprecation warnings regarding the body parameters. This list may change leading up to the 7.15.0 release.

search
index
create
update
scroll
clear_scroll
search_mvt
indices.create

The following APIs will start emitting deprecation warnings regarding doc_type parameters.

nodes.hot_threads
license.post_start_trial

What is being deprecated?

Starting in 7.15.0 the following features will be deprecated and are scheduled for removal in 9.0.0:
Positional arguments for APIs are deprecated

Using keyword arguments has always been recommended when using the client but now starting in 7.15.0 using any positional arguments will emit a deprecation warning.

✅ Supported usage:

es.search(index="index", ...)

❌ Deprecated usage:

es.search("index", ...)

@drotheram
Copy link
Contributor Author

drotheram commented Oct 13, 2021

This affects most *_postgres2es.py scripts but should be a simple fix.

Example:
dsra_postgres2es.py Line 46:
if es.indices.exists("opendrr_" + view):
will have to change to:
if es.indices.exists(index="opendrr_" + view):

@anthonyfok anthonyfok changed the title Deprication warning for positional arguments in ElasticSearch Python module Deprecation warning for positional arguments in ElasticSearch Python module Oct 15, 2021
@jvanulde
Copy link
Contributor

jvanulde commented Jan 4, 2022

@drotheram can we update this issue please. Either reassign to current milestone or put it in the backlog.

@drotheram
Copy link
Contributor Author

Let's backlog this for now

@drotheram drotheram removed this from the Sprint 44 milestone Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants