From 126417be439bc712dee2a60a24674adef011861f Mon Sep 17 00:00:00 2001 From: Song Junho Date: Sat, 29 Mar 2025 18:49:12 +0900 Subject: Fixed #36265 -- Added support for serialization of ZoneInfo instances in migrations. --- docs/releases/6.0.txt | 2 ++ docs/topics/migrations.txt | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt index fe090e3f2a..538d242b98 100644 --- a/docs/releases/6.0.txt +++ b/docs/releases/6.0.txt @@ -178,6 +178,8 @@ Migrations * Squashed migrations can now themselves be squashed before being transitioned to normal migrations. +* Migrations now support serialization of :class:`zoneinfo.ZoneInfo` instances. + Models ~~~~~~ diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index 646b8d5116..799c7f19f4 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -778,6 +778,7 @@ Django can serialize the following: - ``list``, ``set``, ``tuple``, ``dict``, ``range``. - ``datetime.date``, ``datetime.time``, and ``datetime.datetime`` instances (include those that are timezone-aware) +- :class:`zoneinfo.ZoneInfo` instances - ``decimal.Decimal`` instances - ``enum.Enum`` and ``enum.Flag`` instances - ``uuid.UUID`` instances @@ -803,6 +804,10 @@ Django can serialize the following: - Any class reference (must be in module's top-level scope) - Anything with a custom ``deconstruct()`` method (:ref:`see below `) +.. versionchanged:: 6.0 + + Serialization support for :class:`zoneinfo.ZoneInfo` instances was added. + Django cannot serialize: - Nested classes -- cgit v1.3