diff --git a/.github/workflows/tests_and_publish.yml b/.github/workflows/tests_and_publish.yml index 36053e7..7192247 100644 --- a/.github/workflows/tests_and_publish.yml +++ b/.github/workflows/tests_and_publish.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Python uses: actions/setup-python@master with: - python-version: '3.12' + python-version: '3.13' - name: Install packages run: pip install -r requirements_dev.txt @@ -41,7 +41,7 @@ jobs: - name: Setup Python uses: actions/setup-python@master with: - python-version: '3.12' + python-version: '3.13' - name: Install packages run: pip install -r requirements_dev.txt @@ -58,7 +58,7 @@ jobs: - name: Setup Python uses: actions/setup-python@master with: - python-version: '3.12' + python-version: '3.13' - name: Install packages run: pip install -r requirements_dev.txt @@ -75,7 +75,7 @@ jobs: - name: Setup Python uses: actions/setup-python@master with: - python-version: '3.12' + python-version: '3.13' - name: Install packages run: pip install -r requirements_dev.txt @@ -92,7 +92,7 @@ jobs: - name: Setup Python uses: actions/setup-python@master with: - python-version: '3.12' + python-version: '3.13' - name: Install packages run: pip install -r requirements_dev.txt @@ -107,12 +107,20 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.9, '3.10', '3.11', '3.12'] - django-version: [ 32, 42, 50 ] + python-version: [ 3.9, '3.10', '3.11', '3.12', '3.13'] + django-version: [ 42, 50, 51, 52 ] opensearch-version: [ 10, 20 ] exclude: - python-version: 3.9 django-version: 50 + - python-version: 3.9 + django-version: 51 + - python-version: 3.9 + django-version: 52 + - python-version: 3.13 + django-version: 42 + - python-version: 3.13 + django-version: 50 steps: - uses: actions/checkout@v4 @@ -135,7 +143,7 @@ jobs: run: tox -e py-django${{ matrix.django-version }}-opensearch${{ matrix.opensearch-version }} - name: Upload coverage to Codecov - if: matrix.python-version == 3.12 && matrix.django-version == 50 + if: matrix.python-version == 3.13 && matrix.django-version == 52 uses: codecov/codecov-action@v1 with: file: ./coverage.xml @@ -149,10 +157,10 @@ jobs: steps: - uses: actions/checkout@master - - name: Set up Python 3.12 + - name: Set up Python 3.13 uses: actions/setup-python@v4 with: - python-version: '3.12' + python-version: '3.13' - name: Creating Built Distributions run: | diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 57c59cd..6795d17 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,7 +5,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.13" mkdocs: configuration: mkdocs.yml diff --git a/README.md b/README.md index c6985a4..5557fbc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Django Opensearch DSL [![Documentation Status](https://readthedocs.org/projects/django-opensearch-dsl/badge/?version=latest)](https://django-opensearch-dsl.readthedocs.io/en/latest/?badge=latest) ![Tests](https://github.com/Codoc-os/django-opensearch-dsl/workflows/Tests/badge.svg) [![Python 3.9+](https://img.shields.io/badge/Python-3.9+-brightgreen.svg)](#) -[![Django 3.2+](https://img.shields.io/badge/Django-3.2+-brightgreen.svg)](#) +[![Django 4.2+](https://img.shields.io/badge/Django-4.2+-brightgreen.svg)](#) [![OpenSearch 1.3+, 2.7+](https://img.shields.io/badge/OpenSearch-1.3+-brightgreen.svg)](#) [![License Apache 2](https://img.shields.io/badge/license-Apache%202-brightgreen.svg)](https://github.com/Codoc-os/django-opensearch-dsl/blob/master/LICENSE) [![codecov](https://codecov.io/gh/Codoc-os/django-opensearch-dsl/branch/master/graph/badge.svg)](https://codecov.io/gh/Codoc-os/django-opensearch-dsl) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7cbccf1..5ea3a78 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.7.0 (2025-XX-XX) + +* Confirm support for Python 3.13. +* Confirm support for Django 5.1 and 5.2. +* Drop support for Django 3.2. + ### 0.6.2 (2024-04-23) * Fix `CelerySignalProcessor` previously using `RealTimeSignalProcessor`'s method due to wrong indentation ([#66](https://github.com/Codoc-os/django-opensearch-dsl/pull/66)), diff --git a/requirements.txt b/requirements.txt index 2dcd6ce..5db8a27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -django>=2.1 +django>=4.2 opensearch-py>=2.2.0 python-dateutil~=2.8.2 diff --git a/setup.cfg b/setup.cfg index 7aa6b48..b245161 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ ######################## [tox:tox] distshare = {homedir}/.tox/distshare - envlist = py{39,310,311,312}-django{32,42,50}-opensearch{10,20} + envlist = py{39,310,311,312,313}-django{42,50,51,52}-opensearch{10,20} skipsdist = true skip_missing_interpreters = true indexserver = @@ -18,9 +18,10 @@ setenv = deps = -rrequirements.txt -rrequirements_dev.txt - django32: django>=3.2.0,<3.3.0 django42: django>=4.2.0,<4.3.0 django50: django>=5.0.0,<5.1.0 + django51: django>=5.1.0,<5.2.0 + django52: django>=5.2.0,<6.0.0 opensearch10: opensearch-py>=2.2.0 opensearch20: opensearch-py>=2.2.0 commands = diff --git a/setup.py b/setup.py index dd04632..45bfd86 100755 --- a/setup.py +++ b/setup.py @@ -12,10 +12,12 @@ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', 'Framework :: Django :: 5.0', + 'Framework :: Django :: 5.1', + 'Framework :: Django :: 5.2', "Environment :: Web Environment", 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', diff --git a/tests/tests/management/test_index.py b/tests/tests/management/test_index.py index 07973a1..a520a29 100644 --- a/tests/tests/management/test_index.py +++ b/tests/tests/management/test_index.py @@ -9,12 +9,11 @@ from django_opensearch_dsl.registries import registry +devnull = open(os.devnull, "w") +call_command = functools.partial(call_command, stdout=devnull, stderr=devnull) + + class IndexTestCase(SimpleTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - devnull = open(os.devnull, "w") - cls.call_command = functools.partial(call_command, stdout=devnull, stderr=devnull) def setUp(self) -> None: indices = registry.get_indices()