-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #33916 -- Added support for serialization of enum.Flag in migrations. #15949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KommuSoft Thanks 👍 I moved tests that work without any changes to a separate PR, see #15962. Please add also a release note and mention enum.Flag
in "Serializing values", e.g.
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index cf3451a782..9c32fa9a53 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -739,7 +739,7 @@ Django can serialize the following:
- ``datetime.date``, ``datetime.time``, and ``datetime.datetime`` instances
(include those that are timezone-aware)
- ``decimal.Decimal`` instances
-- ``enum.Enum`` instances
+- ``enum.Enum`` and ``enum.Flag`` instances
- ``uuid.UUID`` instances
- :func:`functools.partial` and :class:`functools.partialmethod` instances
which have serializable ``func``, ``args``, and ``keywords`` values.
@@ -756,6 +756,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 <custom-deconstruct-method>`)
+.. versionchanged:: 4.2
+
+ Serialization support for ``enum.Flag`` was added.
+
Django cannot serialize:
- Nested classes
Updated based on the PR comments. |
@KommuSoft Thanks 👍 Welcome aboard ⛵ I added release notes and removed redundant tests, see #15996. |
No description provided.