diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aba4195..00183b0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,12 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.13' architecture: 'x64' - name: Install dependencies and package @@ -38,4 +38,4 @@ jobs: TWINE_REPOSITORY: ${{ secrets.PYPI_REPOSITORY }} TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - TWINE_NON_INTERACTIVE: yes \ No newline at end of file + TWINE_NON_INTERACTIVE: yes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b64b6c..e96cbb4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,20 +8,26 @@ jobs: fail-fast: false matrix: python-version: - - '3.8' - '3.9' - '3.10' - '3.11' + - '3.12' + - '3.13' django-version: - - '3.2' - - '4.1' - '4.2' + - '5.0' + - '5.1' + exclude: + - python-version: 3.9 + django-version: 5.0 + - python-version: 3.9 + django-version: 5.1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -50,4 +56,4 @@ jobs: coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 \ No newline at end of file + uses: codecov/codecov-action@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index cd1638f..407a341 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.0] + +### Added +- Support for Django 5.0 and 5.1 +- Support for Python 3.12 and 3.13 + +### Removed +- Support for Django 3.2 and 4.1 +- Support for Python 3.8 + ## [1.0.0] ### Added - Initial setup -[Unreleased]: https://github.com/anexia/django-generic-contact/compare/1.0.0...HEAD +[Unreleased]: https://github.com/anexia/django-generic-contact/compare/1.1.0...HEAD +[1.1.0]: https://github.com/anexia/django-generic-contact/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/anexia/django-generic-contact/releases/tag/1.0.0 diff --git a/README.md b/README.md index 2171e64..0e3d620 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ GENERIC_CONTACT_DATA_SCHEMA = { See more examples of `GENERIC_CONTACT_DATA_SCHEMA` in `tests/testapp/tests/test_model.py`. #### Customizing the Contact model -The base model `GenericContact` only requires the `data`. Thus you can let your own models inherit from this and extend +The base model `GenericContact` only requires the `data`. Thus, you can let your own models inherit from this and extend it according to your project's needs, e.g.: ``` diff --git a/django_generic_contact/validators.py b/django_generic_contact/validators.py index 227c84a..c672124 100644 --- a/django_generic_contact/validators.py +++ b/django_generic_contact/validators.py @@ -1,13 +1,14 @@ import jsonschema from django.core.exceptions import ValidationError from django.core.validators import BaseValidator +from jsonschema.validators import Draft202012Validator class JSONSchemaValidator(BaseValidator): def compare(self, value, schema): try: jsonschema.validate( - value, schema, format_checker=jsonschema.draft202012_format_checker + value, schema, format_checker=Draft202012Validator.FORMAT_CHECKER ) except jsonschema.exceptions.ValidationError as e: raise ValidationError(str(e)) diff --git a/requirements.txt b/requirements.txt index c3e1be1..202551f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,14 +2,14 @@ -e . # Development dependencies -setuptools>=68.2.2,<68.3 -wheel>=0.41.2,<0.42 -twine>=4.0.2,<4.1 -coverage>=7.3.2,<7.4 +setuptools>=75.1.0,<76.2 +wheel>=0.44.0,<0.45 +twine>=5.1.1,<5.2 +coverage>=7.6.2,<7.7 # Linters and formatters -pre-commit>=3.5.0,<3.6 +pre-commit>=4.0.1,<4.2 # TestApp dependencies -django>=3.2,<4.3 -jsonschema>=4.19.1,<4.20 +django>=4.2,<5.2 +jsonschema>=4.23.0,<4.24 diff --git a/setup.py b/setup.py index 2d96a12..22572b2 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="django-generic-contact", - version=os.getenv("PACKAGE_VERSION", "1.0.0").replace("refs/tags/", ""), + version=os.getenv("PACKAGE_VERSION", "1.1.0").replace("refs/tags/", ""), packages=find_packages(), include_package_data=True, license="MIT License", @@ -24,17 +24,18 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Framework :: Django", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", + "Framework :: Django :: 5.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], ) diff --git a/tests/core/settings.py b/tests/core/settings.py index 9a244c1..bb76301 100644 --- a/tests/core/settings.py +++ b/tests/core/settings.py @@ -61,17 +61,17 @@ WSGI_APPLICATION = "core.wsgi.application" # Database -# https://docs.djangoproject.com/en/3.2/ref/settings/#databases +# https://docs.djangoproject.com/en/stable/ref/settings/#databases DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", - "NAME": os.path.join(BASE_DIR, "db.sqlite3"), + "NAME": os.path.join(BASE_DIR, "../../testapp/db.sqlite3"), } } # Password validation -# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/stable/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { @@ -89,7 +89,7 @@ ] # Internationalization -# https://docs.djangoproject.com/en/3.2/topics/i18n/ +# https://docs.djangoproject.com/en/stable/topics/i18n/ LANGUAGE_CODE = "en-us" @@ -102,7 +102,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/3.2/howto/static-files/ +# https://docs.djangoproject.com/en/stable/howto/static-files/ STATIC_URL = "/static/" diff --git a/tests/core/wsgi.py b/tests/core/wsgi.py index 6529b36..e6b323f 100644 --- a/tests/core/wsgi.py +++ b/tests/core/wsgi.py @@ -2,7 +2,7 @@ WSGI config for core project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/ """ import os