From 5ed8bab7745486557bc4b548a88e7a464d46478d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pinto?= Date: Thu, 10 Jul 2025 10:01:55 +0100 Subject: [PATCH 1/5] Django 5 support --- dbcleanup/__init__.py | 4 ++-- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbcleanup/__init__.py b/dbcleanup/__init__.py index a5134a8..0a57253 100644 --- a/dbcleanup/__init__.py +++ b/dbcleanup/__init__.py @@ -1,10 +1,10 @@ -__version__ = '0.1.4' +__version__ = "0.1.5" # set default_app_config when using django earlier than 3.2 try: import django if django.VERSION < (3, 2): - default_app_config = 'dbcleanup.apps.DBCleanupConfig' + default_app_config = "dbcleanup.apps.DBCleanupConfig" except ImportError: pass diff --git a/setup.cfg b/setup.cfg index ae0e9a0..5a7b6fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ zip_safe = False include_package_data = True packages = find: install_requires = - Django >= 3.0, < 5.0 + Django >= 3.0, < 6.0 python_requires = >=3.7 [options.packages.find] From ac23b52ee584a1e8dea58a0b842938a115fb20f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pinto?= Date: Thu, 10 Jul 2025 10:26:20 +0100 Subject: [PATCH 2/5] fix: python 3.9, 3.11 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d92b6e3..2c33e12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.11] + python-version: [3.9, 3.11] database: [sqlite, mysql, postgresql] services: From 5a1a18cadde871873233aa878cc494d31e394436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pinto?= Date: Thu, 10 Jul 2025 10:30:23 +0100 Subject: [PATCH 3/5] fix: single quotes --- dbcleanup/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbcleanup/__init__.py b/dbcleanup/__init__.py index 0a57253..ab14b34 100644 --- a/dbcleanup/__init__.py +++ b/dbcleanup/__init__.py @@ -1,10 +1,10 @@ -__version__ = "0.1.5" +__version__ = '0.1.5' # set default_app_config when using django earlier than 3.2 try: import django if django.VERSION < (3, 2): - default_app_config = "dbcleanup.apps.DBCleanupConfig" + default_app_config = 'dbcleanup.apps.DBCleanupConfig' except ImportError: pass From b2e6bc194e2b8cf72ee2bc228e838663d627677d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pinto?= Date: Thu, 10 Jul 2025 10:32:30 +0100 Subject: [PATCH 4/5] chore: reformat with black --- testapp/testapp/urls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testapp/testapp/urls.py b/testapp/testapp/urls.py index 8ab3632..ab2af97 100644 --- a/testapp/testapp/urls.py +++ b/testapp/testapp/urls.py @@ -13,9 +13,10 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + from django.contrib import admin from django.urls import path urlpatterns = [ - path('admin/', admin.site.urls), + path("admin/", admin.site.urls), ] From 595df1bd98e62f36a0be4424f6b987c3729ffaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Pinto?= Date: Thu, 10 Jul 2025 10:42:14 +0100 Subject: [PATCH 5/5] postgres:15 for tests --- .github/workflows/test.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c33e12..0900344 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: # needed because the container does not provide a healthcheck options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries=5 postgres: - image: postgres:12-alpine + image: postgres:15-alpine env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres diff --git a/Makefile b/Makefile index 9fe513a..6843512 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ startpg: --health-interval 10s \ --health-timeout 5s \ --health-retries 5 \ - postgres:11-alpine + postgres:15-alpine until [ "`docker inspect -f {{.State.Health.Status}} ${TEST_CONTAINER}-pg`" == "healthy" ]; do sleep 0.1; done; testpg: startpg