Update all mutations to use the new signature classes.
Review Request #10303 — Created Nov. 2, 2018 and submitted
This switches all the mutations over to using the new signature classes
instead of the old dictionaries, giving us a standard API for working
with signatures and simplifying a lot of code.For the most part, the changes are fairly straight-forward moves to the
new API. There are a few larger changes that needed to be made, however.
create_field
,MockModel
, andMockMeta
had to be updated to take
some additional arguments that were no longer able to be pulled from
signature dictionaries directly.
SQLMutation
now needs to do a bit more work to handle legacy
mutation functions, as it needs to now serialize the signature to a
dictionary that the function can operate on and then replace the
state of the project signature with the results of that function.
ChangeMeta
has to do a little more work to check the properties
being changed and manipualting values, since it can't just operate on
raw dictionaries anymore. This actually helps make it more readable
though.While there's still work that needs to done in some places still to stop
working directly with signature dictionaries, this covers the majority
of those cases. The rest will be handled as part of other changes.
Unit tests pass on all supported versions of Django.
Description | From | Last Updated |
---|---|---|
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
optional? |
david | |
Swap these. |
david | |
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot |
- Change Summary:
-
Fixed docstring issues.
- Commit:
-
46f097c3a4c8a9677d6131892b85e2d3a82dbb788efb37167405a4881a7fcbb87b690738ebd212ba
- Diff:
-
Revision 2 (+533 -371)