Change how patches are imported/applied, and patch during test runs.

Review Request #11993 — Created Jan. 24, 2022 and submitted

chipx86
Django Evolution
release-2.x
django-evolution

Django Evolution applies patches when starting up, but we weren't doing
this correctly during test runs. This was mostly an issue when testing
under Python 3.10, which has the collections changes that break older
versions of Django.

The test runner now applies patches. However, this unveiled a new
problem: Some patches need to apply before others can be imported,
especially since they import the database layers of Django.

Now, the module managing patch application lazily imports when applying,
rather than importing on module load. This avoids the import issue, and
eases maintenance going forward.

All unit tests pass for all currently supported combinations of Python
and Django.

Summary
Change how patches are imported/applied, and patch during test runs.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (ee79509)
Loading...