diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb8be753..199b6b2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,11 @@ jobs: strategy: matrix: python-version: ["3.8", "3.12"] - django-version: ["3.2.25", "4.2.11"] + django-version: ["3.2.25", "4.2.17", "5.1.4"] database-engine: ["postgres", "mysql"] + exclude: + - python-version: 3.8 + django-version: 5.1.4 services: postgres: diff --git a/binder/models.py b/binder/models.py index e1259643..8f99d4e1 100644 --- a/binder/models.py +++ b/binder/models.py @@ -19,7 +19,9 @@ from django.db.models import signals from django.core.exceptions import ValidationError from django.db.models.query_utils import Q -from django.utils import timezone +from datetime import timezone +from django.utils.timezone import get_fixed_timezone + from django.utils.translation import gettext_lazy as _ from django.utils.dateparse import parse_date, parse_datetime @@ -343,7 +345,7 @@ def clean_value(self, qualifier, v): offset = int(tzinfo[1:3]) * 60 + int(tzinfo[3:5]) if tzinfo.startswith('-'): offset = -offset - tzinfo = timezone.get_fixed_timezone(offset) + tzinfo = get_fixed_timezone(offset) # Create time object return time( hour=hour, diff --git a/ci-requirements.txt b/ci-requirements.txt index 8e9c8a95..5eed284d 100644 --- a/ci-requirements.txt +++ b/ci-requirements.txt @@ -1,4 +1,4 @@ -psycopg2<3.0 +psycopg2<3.2.3 mysqlclient Pillow django-request-id diff --git a/setup.py b/setup.py index a7f8936b..95d9bb58 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='django-binder', - version='1.6.0', + version='1.7.0', package_dir={'binder': 'binder'}, packages=find_packages(), include_package_data=True, @@ -27,6 +27,7 @@ 'Framework :: Django', 'Framework :: Django :: 3.0', 'Framework :: Django :: 4.0', + 'Framework :: Django :: 5.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', @@ -36,7 +37,7 @@ 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], install_requires=[ - 'Django >= 3.0, < 4.0', + 'Django >= 3.0, < 6.0', 'Pillow >= 3.2.0', 'django-request-id >= 1.0.0', 'requests >= 2.13.0',