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

Prepare switch to Elasticsearch Python client 8.2.0 #1512

Merged
merged 3 commits into from
Jun 8, 2022

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Jun 8, 2022

For compatibility with version 8.x of the Elasticsearch Python client. #1510 does it all in one go but I can't review that given the number of lines and the different concerns. This pull request contains self-sufficient commits for mechanical changes to reduce the scope of #1510. I'll be happy to fix the conflicts.

  • Switch from es.xpack.ml to es.ml (already possible with 7.14)
  • Switch from es.transport.perform_request to es.perform_request (required an adapter method)
  • Call Elasticsearch Python client with keyword arguments (and automatically convert path to url in perform_request calls)

For compatibility with version 8.x of the Elasticsearch Python client.
@pquentin pquentin added cleanup Linter changes, reformatting, removal of unused code etc. :internal Changes for internal, undocumented features: e.g. experimental, release scripts labels Jun 8, 2022
@pquentin pquentin added this to the 2.5.0 milestone Jun 8, 2022
@pquentin pquentin self-assigned this Jun 8, 2022
@pquentin pquentin changed the title Switch from es.xpack.ml to es.ml Prepare switch to Elasticsearch Python client 8.2.0 Jun 8, 2022
This method has moved in elasticsearch-py 8.0, preparing the move now
reduces the churn.
In 8.0, all those arguments become keyword only.
Copy link
Contributor

@michaelbaamonde michaelbaamonde left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks.

@michaelbaamonde michaelbaamonde merged commit 75ce67f into elastic:master Jun 8, 2022
@pquentin pquentin deleted the xpack-to-ml branch June 8, 2022 16:13
@pquentin pquentin added :misc Changes that don't affect users directly: linter fixes, test improvements, etc. and removed :internal Changes for internal, undocumented features: e.g. experimental, release scripts labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Linter changes, reformatting, removal of unused code etc. :misc Changes that don't affect users directly: linter fixes, test improvements, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants