From dfce6ea3d81dbe359e0ff153e540646f4bec8c0e Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Fri, 20 Sep 2024 16:44:09 +0200 Subject: [PATCH] :sparkles: Add support for py3.11/3.12 and drop support for 3.8/3.9 --- .github/workflows/ci.yml | 8 ++++---- README.rst | 6 +++--- setup.cfg | 9 ++++----- testapp/settings.py | 2 +- tests/conftest.py | 2 +- tox.ini | 9 +++------ 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb75489..db3726d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.8', '3.9', '3.10'] - django: ['3.2', '4.1', '4.2'] + python: ['3.10', '3.11', '3.12'] + django: ['4.1', '4.2'] name: Run the test suite (Python ${{ matrix.python }}, Django ${{ matrix.django }}) services: postgres: - image: docker.io/library/postgres:12 + image: docker.io/library/postgres:14 env: POSTGRES_HOST_AUTH_METHOD: trust ports: @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Build sdist and wheel run: | diff --git a/README.rst b/README.rst index 69b26ac..94cf9b1 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ notifications-api-common :Version: 0.2.2 :Source: https://github.com/maykinmedia/notifications-api-common :Keywords: notifications, REST, API, Common Ground, ZGW -:PythonVersion: 3.9 +:PythonVersion: 3.10 |build-status| |code-quality| |black| |coverage| |docs| @@ -29,9 +29,9 @@ Installation Requirements ------------ -* Python 3.8 or above +* Python 3.10 or above * setuptools 30.3.0 or above -* Django 3.2 or newer +* Django 4.1 or newer * Celery 5.0 or newer setup with one worker deployed diff --git a/setup.cfg b/setup.cfg index f3320d2..e233cde 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,16 +17,15 @@ keywords = notifications, REST, API, Common Ground, ZGW classifiers = Development Status :: 4 - Beta Framework :: Django - Framework :: Django :: 3.2 Framework :: Django :: 4.1 Framework :: Django :: 4.2 Intended Audience :: Developers Operating System :: Unix Operating System :: MacOS Operating System :: Microsoft :: Windows - 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 Topic :: Software Development :: Libraries :: Python Modules [options] @@ -34,13 +33,13 @@ zip_safe = False include_package_data = True packages = find: install_requires = - django>=3.2.0 + django>=4.1.0 django-solo djangorestframework>=3.12.0 celery djangorestframework_camel_case>=1.2.0 gemma-zds-client>=0.15.0 - zgw-consumers + zgw-consumers[testutils] tests_require = psycopg2 pytest diff --git a/testapp/settings.py b/testapp/settings.py index b9ef8c8..c4510cf 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -63,4 +63,4 @@ ROOT_URLCONF = "testapp.urls" -ZGW_CONSUMERS_CLIENT_CLASS = "zgw_consumers.client.ZGWClient" +ZGW_CONSUMERS_CLIENT_CLASS = "zgw_consumers.legacy.ZGWClient" diff --git a/tests/conftest.py b/tests/conftest.py index bfe9184..ac7ee5b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,7 @@ import pytest from rest_framework.test import APIClient from zgw_consumers.constants import APITypes -from zgw_consumers.service import Service +from zgw_consumers.models import Service from notifications_api_common.models import NotificationsConfig from testapp import urls # noqa diff --git a/tox.ini b/tox.ini index 3d956dc..7741d87 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,6 @@ [tox] envlist = - py{38,39,310}-django32 - py{38,39,310}-django{41,42} + py{310,311,312}-django{41,42} isort black docs @@ -9,13 +8,12 @@ skip_missing_interpreters = true [gh-actions] python = - 3.8: py38 - 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312 [gh-actions:env] DJANGO = - 3.2: django32 4.1: django41 4.2: django42 @@ -24,7 +22,6 @@ extras = tests coverage deps = - django32: Django~=3.2.0 django41: Django~=4.1.0 django42: Django~=4.2.0 passenv =