Add a module for placeholders for hinted evolutions.

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

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.

Commits

Files