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

v8.0.0 Roadmap #1696

Closed
12 of 13 tasks
sethmlarson opened this issue Aug 26, 2021 · 3 comments
Closed
12 of 13 tasks

v8.0.0 Roadmap #1696

sethmlarson opened this issue Aug 26, 2021 · 3 comments

Comments

@sethmlarson
Copy link
Contributor

sethmlarson commented Aug 26, 2021

Elasticsearch Python Client v8.0.0 Roadmap

Drop support for Python 3.5 and earlier

Downloads for recent Python versions have tapered off to be less than 10%. For v8.0.0 the client will only support Python 3.6+. This choice enables a lot of our other v8.0.0 roadmap items such as keyword-only arguments.

Read more: #1295

Start using the elastic-transport-python package

The elastic-transport-python package was created to enable supporting multiple clients with the same transport library.
With 8.0.0 we're able to switch from the built-in Transport and other utilities to elastic-transport-python.

Require keyword-only arguments for APIs

Due to the high number of arguments per API it's favorable for users to always use keyword arguments. In 7.x non-keyword arguments will be deprecated and in 8.0.0 they will be required and will raise a TypeError if not passed via keyword. When types were first introduced to the module most parameters were marked as keyword-only but wasn't enforced unless using Mypy.

Generate structures and enums from the Elasticsearch Specification

The Elasticsearch Specification allows us to generate structures/enums for the Elasticsearch API. We'll generate these structures to be used for other 8.0 roadmap items related to types.

Read more: #1691

API responses accessible like objects with type hints

Currently API responses are raw deserialized data types without any way to access transport-level information. Starting in v8.0.0 responses will be objects which allow access to transport information like HTTP status, headers, and more. In addition to this JSON responses will include type hints and properties to access to each field.

Read more: #1695

Move body fields of JSON request bodies to top-level parameters

Today with the Elasticsearch client you have to write a JSON blob to the body to pass any values within the HTTP body.
Unfortunately this is where some of the most complex data structures are for the Elasticsearch API (see query DSL, aggregations) which means we're unable to provide a good window into this opaque object via types or auto-complete.

As a part of this effort we'll be deprecating the body parameter in 7.x and removing it in 9.0.0.

Read more: #1680

Move per-request transport parameters out of API functions

Currently we have request_timeout, api_key, and more that can be set on every API. But due to the expansion of JSON body field parameters we should move these away from being set on the API method and instead should have their own method to change a client's configuration per-request. Currently planning on a method like so:

client = Elasticsearch()
client.options(api_key="...").search(index="...")

# Previous was: client.search(index="...", api_key="...")

Require explicit configuration for Elasticsearch nodes

Current URL parsing and configuration has a bunch of inferred properties to the point of it being best to explicitly list scheme://host:port so instead of having these inferred properties we're switching to an explicit approach. Users will now be required to configure scheme://host:port for URLs or specify host:port with use_ssl=True|False

Read more: #1690

Remove the elasticsearch.helpers.test module

This module is only used in our test suite and isn't necessary to be packaged in the elasticsearch namespace.

@sethmlarson
Copy link
Contributor Author

Made the decision to keep the body parameter for another major so both the old and new style of specifying an API request body will be around in 8.0.0. Updated the above list with this information.

@sethmlarson
Copy link
Contributor Author

First pre-release of 8.0.0-alpha1 is available now: https://github.com/elastic/elasticsearch-py/releases/tag/v8.0.0a1

@sethmlarson
Copy link
Contributor Author

Closing the roadmap as 8.0 is feature frozen at this point, the only remaining feature will be added later in 8.x.

@sethmlarson sethmlarson unpinned this issue Feb 1, 2022
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

No branches or pull requests

1 participant