From 67c7c4378d31c91384d0a10ec1b2398608e45369 Mon Sep 17 00:00:00 2001 From: Brian Armstrong Date: Fri, 16 Apr 2021 16:57:52 -0400 Subject: [PATCH] Remove changeReason and update CHANGES to prepare for 3.0.0 (#819) * Remove changeReason and update CHANGES * call out breaking changes --- CHANGES.rst | 19 ++++++++++++++++--- simple_history/utils.py | 9 --------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5ae818c11..94c74d798 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,17 @@ Changes Unreleased ---------- + +3.0.0 (2021-04-16) +---------- + +Breaking changes: + +- Removed support for Django 3.0 +- Removed `changeReason` in favor of `_change_reason` (see 2.10.0) + +Full list of changes: + - Removed support for Django versions prior to 2.2 (gh-652) - Migrate from TravisCI to Github Actions (gh-739) - Add Python 3.9 support (gh-745) @@ -10,9 +21,11 @@ Unreleased - Use ``asgiref`` when available instead of thread locals (gh-747) - Sort imports with isort (gh-751) - Queryset ``history.as_of`` speed improvements by calculating in the DB (gh-758) -- Increase `black` and `isort` python version to 3.6 -- Remove Django 3.0 support -- Add Django 3.2 support +- Increase `black` and `isort` python version to 3.6 (gh-817) +- Remove Django 3.0 support (gh-817) +- Add Django 3.2 support (gh-817) +- Improve French translations (gh-811) +- Remove support for changeReason (gh-819) 2.12.0 (2020-10-14) ------------------- diff --git a/simple_history/utils.py b/simple_history/utils.py index f7290b4c5..d2106faa7 100644 --- a/simple_history/utils.py +++ b/simple_history/utils.py @@ -164,13 +164,4 @@ def get_change_reason_from_object(obj): if hasattr(obj, "_change_reason"): return getattr(obj, "_change_reason") - if hasattr(obj, "changeReason"): - warning_msg = ( - "Using the attr changeReason to populate history_change_reason is" - " deprecated in 2.10.0 and will be removed in 3.0.0. Use " - "_change_reason instead. " - ) - warnings.warn(warning_msg, DeprecationWarning) - return getattr(obj, "changeReason") - return None