• 
      

    Update for changes in fixture loading.

    Review Request #14783 — Created Jan. 15, 2026 and submitted — Latest diff uploaded

    Information

    Djblets
    release-5.x

    Reviewers

    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_fixtures method has been made a @classmethod. This is a
    fundamentally better approach, but causes numerous problems with our own
    fixture code.

    This change updates our FixturesCompilerMixin to operate at class-time
    rather than at test function time. This requires changing the way we
    hide the fixtures classvar from the parent class, since
    __getattribute__ can't work.

    The @add_fixtures decorator is now a performance hit rather than a
    performance benefit. In addition, the replace argument 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.

    Commits

    Files