From 06d345c0d5e2a6b141ae4e09ac43c38d4d3a508f Mon Sep 17 00:00:00 2001 From: Mark Bird Date: Wed, 25 Feb 2026 14:00:36 +0000 Subject: [PATCH 1/2] Add Django 5.2 and 6.0 to test matrix, remove Python 3.8 and 3.9 --- .github/workflows/ci.yml | 18 +++++++++++------- README.md | 8 ++++---- dev-requirements.txt | 8 ++++---- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12898a4..2320db2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,18 +9,22 @@ jobs: strategy: matrix: - python: ["3.8", "3.9", "3.10", "3.11"] - django: ["3.2", "4.0", "4.1", "4.2"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + django: ["4.2", "5.2", "6.0"] exclude: + - python: "3.13" + django: "4.2" + - python: "3.14" + django: "4.2" + - python: "3.10" + django: "6.0" - python: "3.11" - django: "3.2" - - python: "3.11" - django: "4.0" + django: "6.0" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} - name: Install package diff --git a/README.md b/README.md index 32b8c2d..4571fa7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ django-zen-queries Gives you control over which parts of your code are allowed to run queries, and which aren't. -Tested against Django 3.2, 4.0, 4.1 and 4.2 on Python 3.8, 3.9, 3.10 and 3.11. +Tested against Django 4.2, 5.2 and 6.0 on Python 3.10, 3.11, 3.12, 3.13 and 3.14. #### Testimonial @@ -131,7 +131,7 @@ def validate_xyz(pizzas): ... ``` -This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/3.0/topics/class-based-views/intro/#decorating-the-class) utility. +This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/6.0/topics/class-based-views/intro/#decorating-the-class) utility. ### Extra tools @@ -191,11 +191,11 @@ There are {{ pizzas.count }} pizzas. ### Permissions gotcha -Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/2.2/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template. +Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/6.0/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template. ### How does it work? -It uses the [Database Instrumentation](https://docs.djangoproject.com/en/2.2/topics/db/instrumentation/) features introduced in Django 2.0. +It uses the [Database Instrumentation](https://docs.djangoproject.com/en/6.0/topics/db/instrumentation/) features introduced in Django 2.0. ### Installation diff --git a/dev-requirements.txt b/dev-requirements.txt index 9266061..842ee98 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -black==22.6.0 -djangorestframework==3.13.1 -flake8==4.0.1 -isort==5.10.1 +black==26.1.0 +djangorestframework==3.16.1 +flake8==7.3.0 +isort==8.0.0 From f6cb7027b0ab3d9d9fad1e765984c24e23375347 Mon Sep 17 00:00:00 2001 From: Mark Bird Date: Wed, 25 Feb 2026 14:04:38 +0000 Subject: [PATCH 2/2] Link to LTS version --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4571fa7..a8262d0 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ def validate_xyz(pizzas): ... ``` -This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/6.0/topics/class-based-views/intro/#decorating-the-class) utility. +This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/5.2/topics/class-based-views/intro/#decorating-the-class) utility. ### Extra tools @@ -191,11 +191,11 @@ There are {{ pizzas.count }} pizzas. ### Permissions gotcha -Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/6.0/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template. +Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/5.2/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template. ### How does it work? -It uses the [Database Instrumentation](https://docs.djangoproject.com/en/6.0/topics/db/instrumentation/) features introduced in Django 2.0. +It uses the [Database Instrumentation](https://docs.djangoproject.com/en/5.2/topics/db/instrumentation/) features introduced in Django 2.0. ### Installation