Modernize and enhance settings upgrades for upcoming postgresql changes.
Review Request #11373 — Created Jan. 12, 2021 and submitted
Our settings upgrade code is pretty old, and a bit crufty. While most of
it is unlikely to ever need to be run again, it's worth keeping it here
and maintainable than not. Particularly as we iterate on it.Part of this change fixes improves how we output upgraded settings for
databases and cache backends.The other part upgrades the
postgresql_psycopg2
backend to
postgresql
. A little history here: Originally, ages ago, Django had
two backends, and recommended movingpostgresql
to
postgresql_psycopg2
, and we had upgrade code handling this. Then they
flipped this, and in Django 1.9 thepsycopg2
variant became an alias,
which was then formally deprecated in 2.0, and removed in 3.0.Review Board 4.0 doesn't particularly care which is used, but in order
to future-proof, we're handling the upgrades now, moving to the plain
postgresql
backend.Unit tests were added to check the settings upgrade machinery.
Unit tests pass on all supported versions of Python.
Summary | ID |
---|---|
889bb103513e830fb445d43a696e1ebf534b2475 |