Update all mutations to use the new signature classes.

Review Request #10303 — Created Nov. 2, 2018 and submitted

Information

Django Evolution
master
8efb371...

Reviewers

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.

  1. create_field, MockModel, and MockMeta had to be updated to take
    some additional arguments that were no longer able to be pulled from
    signature dictionaries directly.

  2. 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.

  3. 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

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

optional?

daviddavid

Swap these.

daviddavid

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

reviewbotreviewbot

E127 continuation line over-indented for visual indent

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

flake8

david
  1. 
      
  2. django_evolution/mock_models.py (Diff revision 1)
     
     
    Show all issues

    optional?

  3. django_evolution/mock_models.py (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues

    Swap these.

  4. 
      
chipx86
Review request changed
Change Summary:

Fixed docstring issues.

Commit:
46f097c3a4c8a9677d6131892b85e2d3a82dbb78
8efb37167405a4881a7fcbb87b690738ebd212ba

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (aebb007)