diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45b0fd1..a46f693 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,14 +9,12 @@ jobs: strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - django-version: ["3.2", "4.1", "4.2", "5.0"] + django-version: ["3.2", "4.2", "5.0"] exclude: - django-version: "3.2" python-version: "3.11" - django-version: "3.2" python-version: "3.12" - - django-version: "4.1" - python-version: "3.12" - django-version: "5.0" python-version: "3.8" - django-version: "5.0" diff --git a/eav/forms.py b/eav/forms.py index b34bcfe..d85d886 100644 --- a/eav/forms.py +++ b/eav/forms.py @@ -11,6 +11,7 @@ from django.forms import ( Field, FloatField, IntegerField, + JSONField, ModelForm, SplitDateTimeField, ) @@ -18,11 +19,6 @@ from django.utils.translation import gettext_lazy as _ from eav.widgets import CSVWidget -try: - from django.forms import JSONField -except: - JSONField = CharField - class CSVFormField(Field): message = _('Enter comma-separated-values. eg: one;two;three.') diff --git a/eav/logic/slug.py b/eav/logic/slug.py index 1612ee9..4984566 100644 --- a/eav/logic/slug.py +++ b/eav/logic/slug.py @@ -1,13 +1,9 @@ import secrets import string +from typing import Final from django.utils.text import slugify -try: - from typing import Final -except ImportError: - from typing_extensions import Final - SLUGFIELD_MAX_LENGTH: Final = 50 diff --git a/eav/settings.py b/eav/settings.py index d942897..fcd64e7 100644 --- a/eav/settings.py +++ b/eav/settings.py @@ -1,7 +1,3 @@ -try: - from typing import Final -except ImportError: - from typing_extensions import Final # noqa: UP035 - +from typing import Final CHARFIELD_LENGTH: Final = 100 diff --git a/pyproject.toml b/pyproject.toml index a683f49..e7ce7af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,6 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Framework :: Django :: 3.2", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", ]