-
Notifications
You must be signed in to change notification settings - Fork 268
Switch from elasticsearch-dsl-py dependency to elasticsearch-py #492
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
base: master
Are you sure you want to change the base?
Conversation
@violuke The test suite is failing, can you check the issues? |
I've pushed some adjustments in an attempt to fix this, but I cannot get the tests to run locally or via my own fork's GH actions. I might need some help getting these to run. I don't think it's a code problem, but more of a test config/matrix issue. |
Hello @safwanrahman, Could you please take a look at this PR when you have a moment? These changes are important for us too, to add support for Elasticsearch 9. Thanks in advance! |
Ok. Going to take a look later today |
@safwanrahman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the elasticsearch-dsl-py
dependency and imports with the new elasticsearch-py
package, bumps the library version to 9.x, and updates testing/CI configurations to cover Elasticsearch 9 and Django 5.
- Switched all imports and install requirements from
elasticsearch-dsl
toelasticsearch
- Bumped package version from 8.x to 9.0 and updated tox/CI matrices for Python 3.12/3.13 and Django 5.x
- Updated documentation and examples to reference the new package
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tox.ini | Added es9 env, Django 5.x and Python 3.12/3.13 |
setup.py / setup.cfg | Bumped library version to 9.0 and install_requires |
requirements_dev.txt | Replaced elasticsearch-dsl with elasticsearch |
README.rst | Updated narrative to elasticsearch-py |
docs/source/es_index.rst | Updated import path to elasticsearch.dsl.Index |
.github/workflows/ci.yml | Extended matrix for ES 9, Python 3.12/3.13, Django 5 |
All code under django_elasticsearch_dsl and tests |
Swapped imports from elasticsearch_dsl to elasticsearch.dsl |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:28
- Add exclude entries for combinations where
es-py-version
(6.4 or 7.4) is tested against Elasticsearch server9.0.0
, which would otherwise run unsupported client/server pairs.
- - es-py-version: "6.4"
@@ -45,6 +47,9 @@ The library is compatible with all Elasticsearch versions since 5.x | |||
|
|||
.. code-block:: python | |||
|
|||
# Elasticsearch 9.x | |||
elasticsearch-dsl>=9.0.0,<10.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the code snippet to reference elasticsearch>=9.0.0,<10.0.0
instead of elasticsearch-dsl
to match the new dependency.
elasticsearch-dsl>=9.0.0,<10.0.0 | |
elasticsearch>=9.0.0,<10.0.0 |
Copilot uses AI. Check for mistakes.
@@ -1,5 +1,5 @@ | |||
[bumpversion] | |||
current_version = 7.1.1 | |||
current_version = 9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using a full semantic version (e.g., 9.0.0
) for current_version
to align with versioning conventions and bumpversion expectations.
current_version = 9.0 | |
current_version = 9.0.0 |
Copilot uses AI. Check for mistakes.
@@ -8,7 +8,7 @@ | |||
except ImportError: | |||
from distutils.core import setup | |||
|
|||
version = '8.0' | |||
version = '9.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] To match the dependency versions and semantic versioning, consider updating this to version = '9.0.0'
.
version = '9.0' | |
version = '9.0.0' |
Copilot uses AI. Check for mistakes.
Closes #491