Update for changes in fixture loading.
Review Request #14783 — Created Jan. 15, 2026 and updated — Latest diff uploaded
Django 5.2 made an un-announced change that moved fixture loading to
happen at class init time rather than per-test-method. As part of this,
the_load_fixturesmethod has been made a@classmethod. This is a
fundamentally better approach, but causes numerous problems with our own
fixture code.This change updates our
FixturesCompilerMixinto operate at class-time
rather than at test function time. This requires changing the way we
hide thefixturesclassvar from the parent class, since
__getattribute__can't work.The
@add_fixturesdecorator is now a performance hit rather than a
performance benefit. In addition, thereplaceargument is no longer
possible (but luckily, nothing actually used that). I've added a warning
about the performance implications, but for now it's hidden behind an
environment variable because we use this decorator a lot.
Ran unit tests and verified that fixtures worked appropriately.