From aee3e1c791aa0618c4e6c80a6cbc67c4298e98b7 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Fri, 22 Dec 2023 11:15:35 -0600 Subject: [PATCH 1/2] Add Django 5.0 Drop Django 4.1 Fixes #1283 --- .github/workflows/test.yml | 15 ++++++++++----- CHANGES.rst | 1 + README.rst | 2 +- docs/index.rst | 2 +- tox.ini | 5 +++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60816c554..f66d7cd22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,20 +11,25 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev'] - django-version: ['3.2', '4.1', '4.2', 'main'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + django-version: ['3.2', '4.2', '5.0', 'main'] exclude: + # Exclude py3.8 and py3.9 for Django main and 5.0 + - python-version: '3.8' + django-version: '5.0' + - python-version: '3.9' + django-version: '5.0' - python-version: '3.8' django-version: 'main' - - python-version: '3.9' django-version: 'main' + # Exclude py3.11 and py3.12 for Django 3.2 - python-version: '3.11' django-version: '3.2' - - python-version: '3.12-dev' + - python-version: '3.12' django-version: '3.2' services: @@ -115,7 +120,7 @@ jobs: # Install this project in editable mode, so that its package metadata can be queried pip install -e . # Install the latest minor version of Django we support - pip install Django==4.2 + pip install Django==5.0 - name: Check translation files are updated run: python -m simple_history.tests.generated_file_checks.check_translations diff --git a/CHANGES.rst b/CHANGES.rst index 049e39f75..11123004a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,7 @@ Unreleased version is lower than 4.2 (gh-1261) - Small performance optimization of the ``clean-duplicate_history`` command (gh-1015) - Support Simplified Chinese translation (gh-1281) +- Added support for Django 5.0 (gh-1283) 3.4.0 (2023-08-18) ------------------ diff --git a/README.rst b/README.rst index cff8ae901..fd2e270d0 100644 --- a/README.rst +++ b/README.rst @@ -42,8 +42,8 @@ This app supports the following combinations of Django and Python: Django Python ========== ======================== 3.2 3.8, 3.9, 3.10 -4.1 3.8, 3.9, 3.10, 3.11, 3.12-dev 4.2 3.8, 3.9, 3.10, 3.11, 3.12-dev +5.0 3.10, 3.11, 3.12-dev main 3.10, 3.11, 3.12-dev ========== ======================== diff --git a/docs/index.rst b/docs/index.rst index 75afa9a03..37c697ff3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,8 +42,8 @@ This app supports the following combinations of Django and Python: Django Python ========== ======================= 3.2 3.8, 3.9, 3.10 -4.1 3.8, 3.9, 3.10, 3.11, 3.12-dev 4.2 3.8, 3.9, 3.10, 3.11, 3.12-dev +5.0 3.10, 3.11, 3.12-dev main 3.10, 3.11, 3.12-dev ========== ======================= diff --git a/tox.ini b/tox.ini index 87b3588a0..3611df84a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = py{38,39,310}-dj32-{sqlite3,postgres,mysql,mariadb}, - py{38,39,310,311,312}-dj41-{sqlite3,postgres,mysql,mariadb}, py{38,39,310,311,312}-dj42-{sqlite3,postgres,mysql,mariadb}, + py{310,311,312}-dj50-{sqlite3,postgres,mysql,mariadb}, py{310,311,312}-djmain-{sqlite3,postgres,mysql,mariadb}, docs, lint @@ -18,8 +18,8 @@ python = [gh-actions:env] DJANGO = 3.2: dj32 - 4.1: dj41 4.2: dj42 + 5.0: dj50 main: djmain [flake8] @@ -34,6 +34,7 @@ deps = dj32: Django>=3.2,<3.3 dj41: Django>=4.1,<4.2 dj42: Django>=4.2,<4.3 + dj50: Django>=5.0,<5.1 djmain: https://github.com/django/django/tarball/main postgres: -rrequirements/postgres.txt mysql: -rrequirements/mysql.txt From 607cdccea175eccc6a227c5ad7bee71db8bae3d0 Mon Sep 17 00:00:00 2001 From: Anders <6058745+ddabble@users.noreply.github.com> Date: Sat, 17 Feb 2024 00:36:42 +0100 Subject: [PATCH 2/2] Added support for Python 3.13 3.13 can't be tested with postgres, as `psycopg2-binary` doesn't currently support 3.13 - see e.g. https://github.com/ddabble/django-simple-history/actions/runs/7937535510/job/21674900984. I still think it's better to add early support of 3.13 and temporarily test without postgres, since all the other packages (and our code) currently work with 3.13. Also bumped the Python version in `.readthedocs.yaml` to 3.12, as it's the latest, stable version available. Also removed the recently dropped Django 4.1 from `setup.py` and `tox.ini`, and added Django 5.0 to `setup.py`. --- .github/workflows/test.yml | 7 ++++--- .readthedocs.yaml | 2 +- CHANGES.rst | 1 + README.rst | 6 +++--- docs/index.rst | 6 +++--- setup.py | 3 ++- tox.ini | 5 ++++- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f66d7cd22..575ab7ac0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev'] django-version: ['3.2', '4.2', '5.0', 'main'] exclude: @@ -25,12 +25,13 @@ jobs: - python-version: '3.9' django-version: 'main' - # Exclude py3.11 and py3.12 for Django 3.2 + # Exclude py3.11, py3.12 and py3.13 for Django 3.2 - python-version: '3.11' django-version: '3.2' - - python-version: '3.12' django-version: '3.2' + - python-version: '3.13-dev' + django-version: '3.2' services: diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 216a72cd0..7e1713f64 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.12" # Build documentation in the "docs/" directory with Sphinx sphinx: diff --git a/CHANGES.rst b/CHANGES.rst index 11123004a..e59068057 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -17,6 +17,7 @@ Unreleased - Small performance optimization of the ``clean-duplicate_history`` command (gh-1015) - Support Simplified Chinese translation (gh-1281) - Added support for Django 5.0 (gh-1283) +- Added support for Python 3.13 (gh-1289) 3.4.0 (2023-08-18) ------------------ diff --git a/README.rst b/README.rst index fd2e270d0..c8442f686 100644 --- a/README.rst +++ b/README.rst @@ -42,9 +42,9 @@ This app supports the following combinations of Django and Python: Django Python ========== ======================== 3.2 3.8, 3.9, 3.10 -4.2 3.8, 3.9, 3.10, 3.11, 3.12-dev -5.0 3.10, 3.11, 3.12-dev -main 3.10, 3.11, 3.12-dev +4.2 3.8, 3.9, 3.10, 3.11, 3.12, 3.13-dev +5.0 3.10, 3.11, 3.12, 3.13-dev +main 3.10, 3.11, 3.12, 3.13-dev ========== ======================== Getting Help diff --git a/docs/index.rst b/docs/index.rst index 37c697ff3..e6eaaf749 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,9 +42,9 @@ This app supports the following combinations of Django and Python: Django Python ========== ======================= 3.2 3.8, 3.9, 3.10 -4.2 3.8, 3.9, 3.10, 3.11, 3.12-dev -5.0 3.10, 3.11, 3.12-dev -main 3.10, 3.11, 3.12-dev +4.2 3.8, 3.9, 3.10, 3.11, 3.12, 3.13-dev +5.0 3.10, 3.11, 3.12, 3.13-dev +main 3.10, 3.11, 3.12, 3.13-dev ========== ======================= Contribute diff --git a/setup.py b/setup.py index fdfe8ec53..8e1909d60 100644 --- a/setup.py +++ b/setup.py @@ -39,8 +39,8 @@ "Intended Audience :: Developers", "Framework :: Django", "Framework :: Django :: 3.2", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", @@ -48,6 +48,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: BSD License", ], python_requires=">=3.8", diff --git a/tox.ini b/tox.ini index 3611df84a..dc692c674 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,9 @@ envlist = py{38,39,310,311,312}-dj42-{sqlite3,postgres,mysql,mariadb}, py{310,311,312}-dj50-{sqlite3,postgres,mysql,mariadb}, py{310,311,312}-djmain-{sqlite3,postgres,mysql,mariadb}, + # DEV: Add `313` to the Python versions above (so that postgres is tested with 3.13) + # when `psycopg2-binary` supports 3.13 + py313-dj{42,50,main}-{sqlite3,mysql,mariadb}, docs, lint @@ -14,6 +17,7 @@ python = 3.10: py310 3.11: py311, docs, lint 3.12: py312 + 3.13: py313 [gh-actions:env] DJANGO = @@ -32,7 +36,6 @@ exclude = __init__.py,simple_history/registry_tests/migration_test_app/migration deps = -rrequirements/test.txt dj32: Django>=3.2,<3.3 - dj41: Django>=4.1,<4.2 dj42: Django>=4.2,<4.3 dj50: Django>=5.0,<5.1 djmain: https://github.com/django/django/tarball/main