Add serialization for Enum and CombinedExpression.

Review Request #12043 — Created Feb. 4, 2022 and submitted

chipx86
Django Evolution
release-2.x
django-evolution

This enhances the serialization support to represent Enum values and
CombinedExpression instances.

Enums are stored as a dictionary with metadata needed to resolve the
enum.

CombinedExpression is used only in generated Python code. It's turned
into a <left> <op> <right> expression in code. Support is partially
implemented for versions prior to Django 2.0, but not tested. This
feature is really only used in a way that matters for evolutions in 2.0
or higher, which is important, because prior versions don't support
object deconstruction, meaning they can't be serialized without explicit
serializers written for them.

Tested with upcoming changes that use these types.

Summary
Add serialization for Enum and CombinedExpression.
Description From Last Updated

F401 'django_evolution.serialization.Enum' imported but unused

reviewbotreviewbot

F811 redefinition of unused 'test_with_deferrable' from line 303

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (500928d)
Loading...