From 594594a8e5f332e37c70c759a9903fa8904daedd Mon Sep 17 00:00:00 2001 From: mattiagiupponi Date: Fri, 12 Jan 2024 10:07:33 +0100 Subject: [PATCH 1/2] Django upgrade to 4.2 --- dynamic_rest/filters.py | 4 ++-- install_requires.txt | 4 ++-- requirements.benchmark.txt | 4 ++-- tox.ini | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dynamic_rest/filters.py b/dynamic_rest/filters.py index 8ceffec4..50829d56 100644 --- a/dynamic_rest/filters.py +++ b/dynamic_rest/filters.py @@ -7,7 +7,7 @@ from functools import reduce from rest_framework import serializers from rest_framework.exceptions import ValidationError -from rest_framework.fields import BooleanField, NullBooleanField +from rest_framework.fields import BooleanField from rest_framework.filters import BaseFilterBackend, OrderingFilter from dynamic_rest.utils import is_truthy @@ -148,7 +148,7 @@ def rewrite_filters(fs, serializer): out = {} for node in fs.values(): filter_key, field = node.generate_query_key(serializer) - if isinstance(field, (BooleanField, NullBooleanField)): + if isinstance(field, BooleanField): node.value = is_truthy(node.value) out[filter_key] = node.value diff --git a/install_requires.txt b/install_requires.txt index f4417505..e3cde891 100644 --- a/install_requires.txt +++ b/install_requires.txt @@ -1,5 +1,5 @@ -Django>=2.2,<4.2 -djangorestframework>=3.11.2,<3.15 +Django>=2.2,<4.3 +djangorestframework>=3.14.0,<3.15 inflection>=0.4.0 requests hashids>=1.3.1 diff --git a/requirements.benchmark.txt b/requirements.benchmark.txt index 8dc0c1f5..01e71e7e 100644 --- a/requirements.benchmark.txt +++ b/requirements.benchmark.txt @@ -1,7 +1,7 @@ dj-database-url==0.3.0 django-debug-toolbar==1.7 -Django>=2.2,<4.2 -djangorestframework>=3.11.2,<3.15 +Django>=2.2,<4.3 +djangorestframework>=3.14.0,<3.15 djay>=0.0.9 flake8>=3.0 psycopg2-binary==2.9.3 diff --git a/tox.ini b/tox.ini index 2e668ba1..94e7e0b0 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ addopts=--tb=short [tox] envlist = py310-lint, - {py37,py38,py39,py310}-django{22,31,32,40,41}-drf{311,312,313,314}, + {py37,py38,py39,py310}-django{22,31,32,40,41,42}-drf{311,312,313,314}, [testenv] commands = ./runtests.py --fast {posargs} --coverage -rw @@ -16,6 +16,7 @@ deps = django32: Django>=3.2,<3.3 django40: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 + django42: Django>=4.2,<4.3 drf311: djangorestframework>=3.11.2,<3.12 drf312: djangorestframework>=3.12,<3.13 drf313: djangorestframework>=3.13,<3.14 @@ -29,6 +30,6 @@ deps = -rrequirements.txt [testenv:py310-drf314-benchmarks] commands = ./runtests.py --benchmarks deps = - Django==4.1.1 + Django>=4.2,<4.3 djangorestframework==3.14 -rrequirements.benchmark.txt From 1cc72e4d909ca4966bfab4dc99433c06d7eddc07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:23:56 +0000 Subject: [PATCH 2/2] Bump django-debug-toolbar from 1.7 to 1.11.1 Bumps [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar) from 1.7 to 1.11.1. - [Release notes](https://github.com/jazzband/django-debug-toolbar/releases) - [Changelog](https://github.com/jazzband/django-debug-toolbar/blob/1.11.1/docs/changes.rst) - [Commits](https://github.com/jazzband/django-debug-toolbar/compare/1.7...1.11.1) --- updated-dependencies: - dependency-name: django-debug-toolbar dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.benchmark.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.benchmark.txt b/requirements.benchmark.txt index 01e71e7e..92ac0c40 100644 --- a/requirements.benchmark.txt +++ b/requirements.benchmark.txt @@ -1,5 +1,5 @@ dj-database-url==0.3.0 -django-debug-toolbar==1.7 +django-debug-toolbar==1.11.1 Django>=2.2,<4.3 djangorestframework>=3.14.0,<3.15 djay>=0.0.9