Add a module for placeholders for hinted evolutions.

Review Request #11982 — Created Jan. 22, 2022 and submitted

Information

Django Evolution
release-2.x

Reviewers

When generating hinted evolutions, sometimes we're unable to compute a
value and instead place a marker that users must fill in. This ensures a
syntax error is hit, rather than executing a bad evolution.

There's currently only one placeholder type, NullFieldInitialCallback.
This change gives it a parent class, BasePlaceholder, and moves back
into a new placeholders.py. This reduces dependence in the codebase on
the specific class, and avoids an upcoming circular dependency caused by
having it in diff.py.

Unit tests pass on all supported versions of Python and Django.

Tested this with an upcoming change that checks against BasePlaceholder.

Summary ID
Add a module for placeholders for hinted evolutions.
When generating hinted evolutions, sometimes we're unable to compute a value and instead place a marker that users must fill in. This ensures a syntax error is hit, rather than executing a bad evolution. There's currently only one placeholder type, `NullFieldInitialCallback`. This change gives it a parent class, `BasePlaceholder`, and moves back into a new `placeholders.py`. This reduces dependence in the codebase on the specific class, and avoids an upcoming circular dependency caused by having it in `diff.py`.
5c18ce00243e3195e3878d6ba017747249989618
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (447db98)
Loading...