Fix building packages on Python 3.10.

Review Request #12156 — Created March 16, 2022 and submitted

Information

Review Board
release-4.0.x

Reviewers

Two parts of the build process, build-i18n.py and build-media.py,
trigger the collections import issues on Python 3.10. This wasn't a
problem for releases before due to our build process favoring building
multi-version wheels with Python 2.7 and due to eggs not being built for
Python 3.x, but it's going to be a problem going forward as that logic
has changed.

We now apply all the Django Evolution patches, which includes the
collections patch, to Django before Django itself is initialized. This
ensures we can build on all supported versions of Python.

Successfully built packages on Python 3.10.

Summary ID
Fix building packages on Python 3.10.
Two parts of the build process, `build-i18n.py` and `build-media.py`, trigger the `collections` import issues on Python 3.10. This wasn't a problem for releases before due to our build process favoring building multi-version wheels with Python 2.7 and due to eggs not being built for Python 3.x, but it's going to be a problem going forward as that logic has changed. We now apply all the Django Evolution patches, which includes the collections patch, to Django before Django itself is initialized. This ensures we can build on all supported versions of Python.
493055b7a4d248253b5637cec0af4be31e8f2933
Description From Last Updated

E402 module level import not at top of file

reviewbotreviewbot

E402 module level import not at top of file

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (968a768)