diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 08444c41..41e86efd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,23 +11,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] django-version: ['4.2', '5.0', '5.1', '5.2', '6.0', 'main'] exclude: - # Exclude py3.9 for Django >= 5.0, - # and py3.10 and py3.11 for Django > 5.2 + # Exclude py3.10 and py3.11 for Django > 5.2 # and py3.14 for Django < 5.2 - - python-version: '3.9' - django-version: '5.0' - - python-version: '3.9' - django-version: '5.1' - - python-version: '3.9' - django-version: '5.2' - - python-version: '3.9' - django-version: '6.0' - - python-version: '3.9' - django-version: 'main' - python-version: '3.10' django-version: '6.0' - python-version: '3.10' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34411405..46c404e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: rev: 25.1.0 hooks: - id: black - language_version: python3.9 + language_version: python3.10 - repo: https://github.com/codespell-project/codespell rev: v2.4.1 @@ -66,4 +66,4 @@ repos: rev: v3.20.0 hooks: - id: pyupgrade - args: [--py39-plus] + args: [--py310-plus] diff --git a/CHANGES.rst b/CHANGES.rst index 34a86b8c..eb12354b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,8 +4,9 @@ Changes Unreleased ---------- -- Added support for Python 3.14 -- Added support for Django 6.0 +- Added support for Python 3.14 (gh-1529) +- Added support for Django 6.0 (gh-1529) +- Dropped support for Python 3.9 (gh-1560) 3.10.1 (2025-06-20) ------------------- diff --git a/README.rst b/README.rst index 967bec83..93dd8a73 100644 --- a/README.rst +++ b/README.rst @@ -41,7 +41,7 @@ This app supports the following combinations of Django and Python: ========== ======================== Django Python ========== ======================== -4.2 3.9, 3.10, 3.11, 3.12, 3.13 +4.2 3.10, 3.11, 3.12, 3.13 5.0 3.10, 3.11, 3.12, 3.13 5.1 3.10, 3.11, 3.12, 3.13 5.2 3.10, 3.11, 3.12, 3.13, 3.14 diff --git a/docs/index.rst b/docs/index.rst index 2bcc6c3c..a7e99e26 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,7 +37,7 @@ This app supports the following combinations of Django and Python: ========== ======================= Django Python ========== ======================= -4.2 3.9, 3.10, 3.11, 3.12, 3.13 +4.2 3.10, 3.11, 3.12, 3.13 5.0 3.10, 3.11, 3.12, 3.13 5.1 3.10, 3.11, 3.12, 3.13 5.2 3.10, 3.11, 3.12, 3.13, 3.14 diff --git a/pyproject.toml b/pyproject.toml index a177620d..6271a7a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ maintainers = [ authors = [ { name = "Corey Bertram", email = "corey@qr7.com" }, ] -requires-python = ">=3.9" +requires-python = ">=3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", @@ -28,7 +28,6 @@ classifiers = [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -80,12 +79,12 @@ fragments = [ [tool.black] line-length = 88 target-version = [ - "py39", + "py310", ] [tool.isort] profile = "black" -py_version = "39" +py_version = "310" [tool.codespell] skip = "AUTHORS.rst,*.po" diff --git a/simple_history/template_utils.py b/simple_history/template_utils.py index 722edf1b..6c56748f 100644 --- a/simple_history/template_utils.py +++ b/simple_history/template_utils.py @@ -1,6 +1,6 @@ import dataclasses from os.path import commonprefix -from typing import Any, Final, Union +from typing import Any, Final from django.db.models import ManyToManyField, Model from django.utils.html import conditional_escape @@ -134,7 +134,7 @@ def stringify_delta_change_values( if all the passed elements are safe strings. """ - def stringify_value(value: Any) -> Union[str, SafeString]: + def stringify_value(value: Any) -> str | SafeString: # If `value` is a list, stringify each element using `str()` instead of # `repr()` (the latter is the default when calling `list.__str__()`) if isinstance(value, list): diff --git a/tox.ini b/tox.ini index b6243990..90baf0c5 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,6 @@ envlist = [gh-actions] python = - 3.9: py39 3.10: py310 3.11: py311, docs, lint 3.12: py312