Django-simple-history

Latest version: v3.7.0

Safety actively analyzes 688578 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

3.7.0

------------------

- Dropped support for Django 3.2, which reached end-of-life on 2024-04-01 (gh-1344)
- Removed the temporary requirement on ``asgiref>=3.6`` added in 3.5.0,
now that the minimum required Django version is 4.2 (gh-1344)
- Migrated package building from using the deprecated ``setup.py`` to using
``pyproject.toml`` (with Hatchling as build backend);
``setup.py`` has consequently been removed (gh-1348)
- Added ``django>=4.2`` as an installation dependency, to mirror the minimum version
tested in our CI (gh-1349)

3.6.0

------------------

- Support custom History ``Manager`` and ``QuerySet`` classes (gh-1280)
- Renamed the (previously internal) admin template
``simple_history/_object_history_list.html`` to
``simple_history/object_history_list.html``, and added the field
``SimpleHistoryAdmin.object_history_list_template`` for overriding it (gh-1128)
- Deprecated the undocumented template tag ``simple_history_admin_list.display_list()``;
it will be removed in version 3.8 (gh-1128)
- Added ``SimpleHistoryAdmin.get_history_queryset()`` for overriding which ``QuerySet``
is used to list the historical records (gh-1128)
- Added ``SimpleHistoryAdmin.get_history_list_display()`` which returns
``history_list_display`` by default, and made the latter into an actual field (gh-1128)
- ``ModelDelta`` and ``ModelChange`` (in ``simple_history.models``) are now immutable
dataclasses; their signatures remain unchanged (gh-1128)
- ``ModelDelta``'s ``changes`` and ``changed_fields`` are now sorted alphabetically by
field name. Also, if ``ModelChange`` is for an M2M field, its ``old`` and ``new``
lists are sorted by the related object. This should help prevent flaky tests. (gh-1128)
- ``diff_against()`` has a new keyword argument, ``foreign_keys_are_objs``;
see usage in the docs under "History Diffing" (gh-1128)
- Added a "Changes" column to ``SimpleHistoryAdmin``'s object history table, listing
the changes between each historical record of the object; see the docs under
"Customizing the History Admin Templates" for overriding its template context (gh-1128)
- Fixed the setting ``SIMPLE_HISTORY_ENABLED = False`` not preventing M2M historical
records from being created (gh-1328)
- For history-tracked M2M fields, adding M2M objects (using ``add()`` or ``set()``)
used to cause a number of database queries that scaled linearly with the number of
objects; this has been fixed to now be a constant number of queries (gh-1333)

3.5.0

------------------

- Fixed ``FieldError`` when creating historical records for many-to-many fields with
``to="self"`` (gh-1218)
- Allow ``HistoricalRecords.m2m_fields`` as str (gh-1243)
- Fixed ``HistoryRequestMiddleware`` deleting non-existent
``HistoricalRecords.context.request`` in very specific circumstances (gh-1256)
- Added ``custom_historical_attrs`` to ``bulk_create_with_history()`` and
``bulk_update_with_history()`` for setting additional fields on custom history models
(gh-1248)
- Passing an empty list as the ``fields`` argument to ``bulk_update_with_history()`` is
now allowed; history records will still be created (gh-1248)
- Added temporary requirement on ``asgiref>=3.6`` while the minimum required Django
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)
- Added support for Python 3.13 (gh-1289)

3.4.0

------------------

- Fixed typos in the docs
- Added feature to evaluate ``history`` model permissions explicitly when
``SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS`` is set to ``True``
in ``settings`` (gh-1017).
- Fixed ``SimpleHistoryAdmin`` not properly integrating with custom user models (gh-1177)
- Support Indonesian translation (gh-1198)
- Support Urdu translation (gh-1199)
- Support Norwegian Bokmål translation (gh-1210)
- Dropped support for Python 3.7, which reached end-of-life on 2023-06-27 (gh-1202)
- Dropped support for Django 4.0, which reached end-of-life on 2023-04-01 (gh-1202)
- Added support for Django 4.2 (gh-1202)
- Made ``bulk_update_with_history()`` return the number of model rows updated (gh-1206)
- Fixed ``HistoryRequestMiddleware`` not cleaning up after itself (i.e. deleting
``HistoricalRecords.context.request``) under some circumstances (gh-1188)
- Made ``HistoryRequestMiddleware`` async-capable (gh-1209)
- Fixed error when setting ``table_name`` with ``inherit=True`` (gh-1195)

3.3.0

------------------

- Made it possible to use the new ``m2m_fields`` with model inheritance (gh-1042)
- Added two signals: ``pre_create_historical_m2m_records`` and ``post_create_historical_m2m_records`` (gh-1042)
- Added ``tracked_fields`` attribute to historical models (gh-1038)
- Fixed ``KeyError`` when running ``clean_duplicate_history`` on models with ``excluded_fields`` (gh-1038)
- Added support for Python 3.11 (gh-1053)
- Added Arabic translations (gh-1056)
- Fixed a code example under "Tracking many to many relationships" (gh-1069)
- Added a ``--base-manager`` option to the ``clean_duplicate_history`` management command (gh-1115)

3.2.0

------------------

- Fixed typos in the docs
- Removed n+1 query from ``bulk_create_with_history`` utility (gh-975)
- Started using ``exists`` query instead of ``count`` in ``populate_history`` command (gh-982)
- Add basic support for many-to-many fields (gh-399)
- Added support for Django 4.1 (gh-1021)

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.