From 183fb7b2b9778f7d7cc91f5a7e5afec61b85179e Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Fri, 1 Dec 2017 19:24:56 +0500 Subject: Fixed #28870 -- Added support for functools.partialmethod serialization in migrations. --- docs/releases/2.1.txt | 2 +- docs/topics/migrations.txt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/releases/2.1.txt b/docs/releases/2.1.txt index ed1ee8cb88..1183bd3121 100644 --- a/docs/releases/2.1.txt +++ b/docs/releases/2.1.txt @@ -150,7 +150,7 @@ Management Commands Migrations ~~~~~~~~~~ -* ... +* Added support for serialization of ``functools.partialmethod`` objects. Models ~~~~~~ diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index 227d64d989..a45966ccb0 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -661,8 +661,8 @@ Django can serialize the following: - ``decimal.Decimal`` instances - ``enum.Enum`` instances - ``uuid.UUID`` instances -- ``functools.partial`` instances which have serializable ``func``, ``args``, - and ``keywords`` values. +- :func:`functools.partial` and :class:`functools.partialmethod` instances + which have serializable ``func``, ``args``, and ``keywords`` values. - ``LazyObject`` instances which wrap a serializable value. - Any Django field - Any function or method reference (e.g. ``datetime.datetime.today``) (must be in module's top-level scope) @@ -670,6 +670,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:: 2.1 + + Serialization support for :class:`functools.partialmethod` was added. + Django cannot serialize: - Nested classes -- cgit v1.3