Skip to content

Add support for ES9 and drop unsupported dependencies #500

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,25 @@ jobs:
fail-fast: false

matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2", "4.1", "4.2"]
es-dsl-version: ["6.4", "7.4"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
django-version: ["4.2", "4.2.8", "5.0", "5.1", "5.1.3", "5.2"]
es-version: ["9.0.2"]

exclude:
- python-version: "3.11"
django-version: "3.2"
- django-version: "4.2"
python-version: "3.12"
- django-version: "4.2"
python-version: "3.13"
- django-version: "4.2.8"
python-version: "3.13"
- django-version: "5.0"
python-version: "3.9"
- django-version: "5.1"
python-version: "3.9"
- django-version: "5.1.3"
python-version: "3.9"
- django-version: "5.2"
python-version: "3.9"

steps:
- name: Install and Run Elasticsearch
Expand All @@ -31,7 +42,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -47,12 +58,11 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install "Django==${{ matrix.django-version }}"
python -m pip install "elasticsearch-dsl==${{ matrix.es-dsl-version }}"
python -m pip install -r requirements_test.txt

- name: Run tests with Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }} and elasticsearch-dsl-py ${{ matrix.es-dsl-version }}
- name: Run tests with Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }}
run: |
TOX_ENV=$(echo "py${{ matrix.python-version }}-django-${{ matrix.django-version }}-es${{ matrix.es-dsl-version }}" | tr -d .)
TOX_ENV=$(echo "py${{ matrix.python-version }}-dj${{ matrix.django-version }}" | tr -d .)
python -m tox -e $TOX_ENV -- --elasticsearch
python -m tox -e $TOX_ENV -- --elasticsearch --signal-processor celery

Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sphinx:
formats: all

python:
version: 3.8
version: 3.9
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ Features
- Index fast using `parallel` indexing.
- Requirements

- Django >= 3.2
- Python 3.8, 3.9, 3.10, 3.11
- Django >= 4.2
- Python 3.9, 3.10, 3.11, 3.12, 3.13

**Elasticsearch Compatibility:**
The library is compatible with all Elasticsearch versions since 5.x
**but you have to use a matching major version:**

- For Elasticsearch 9.0 and later, use the major version 9 (9.x.y) of the library.

- For Elasticsearch 8.0 and later, use the major version 8 (8.x.y) of the library.

- For Elasticsearch 7.0 and later, use the major version 7 (7.x.y) of the library.
Expand All @@ -45,6 +47,9 @@ The library is compatible with all Elasticsearch versions since 5.x

.. code-block:: python

# Elasticsearch 9.x
elasticsearch>=9.0.0,<10.0.0

# Elasticsearch 8.x
elasticsearch-dsl>=8.0.0,<9.0.0

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
django>=3.2
elasticsearch>=8.18.0,<9.0.0
django>=4.2
elasticsearch>=9.0.0,<10.0.0
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bumpversion==0.6.0
wheel==0.45.1
django>=3.2
elasticsearch>=8.18.0,<9.0.0
django>=4.2
elasticsearch>=9.0.0,<10.0.0
twine
sphinx
-e .
10 changes: 5 additions & 5 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
coverage==7.3.1
mock>=1.0.1
flake8>=2.1.0
coverage>=7.9.1
mock>=5.2.0
flake8>=7.3.0
tox>=1.7.0
Pillow==10.0.0
celery>=4.1.0
Pillow>=11.0.0
celery>=5.5.3

# Additional test requirements go here
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
setup(
name='django-elasticsearch-dsl',
version=version,
python_requires=">=3.8",
python_requires=">=3.9",
description="""Wrapper around elasticsearch-dsl-py for django models""",
long_description=readme + '\n\n' + history,
author='Sabricot',
Expand All @@ -43,7 +43,7 @@
],
include_package_data=True,
install_requires=[
'elasticsearch>=8.18.0,<9.0.0',
'elasticsearch>=9.0.0,<10.0.0',
'six',
],
license="Apache Software License 2.0",
Expand All @@ -52,19 +52,21 @@
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Framework :: Django :: 5.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
extras_require={
'celery': ["celery>=4.1.0"],
'celery': ["celery>=5.5.3"],
}
)
23 changes: 10 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[tox]
envlist =
py{38,39,310}-django-{32,41,42}-{es64,es74}
py{311}-django-{41,42}-{es64,es74}
py{39,310,311}-dj{42}
py{39,310,311,312}-dj{428}
py{310,311,312}-dj{50,51}
py{310,311,312,313}-dj{513,52}


[testenv]
Expand All @@ -10,15 +12,10 @@ setenv =
commands = coverage run --source django_elasticsearch_dsl runtests.py {posargs}

deps =
django-32: Django>=3.2,<3.3
django-41: Django>=4.1,<4.2
django-42: Django>=4.2,<4.3
es64: elasticsearch-dsl>=6.4.0,<7.0.0
es74: elasticsearch-dsl>=7.4.0,<8
dj42: Django>=4.2,<4.2.8
dj428: Django>=4.2.8,<5.0
dj50: Django>=5.0,<5.1
dj51: Django>=5.1,<5.1.3
dj513: Django>=5.1.3,<5.2
dj52: Django>=5.2,<5.3
-r{toxinidir}/requirements_test.txt

basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11