Support Django 4.x
Django 4.x is now in unstable, and there is an error when building the freedombox package:
____________ ERROR at setup of TestSetupMiddleware.test_module_view ____________
load_cfg = <module 'plinth.cfg' from '/build/freedombox-22.13/plinth/cfg.py'>
@staticmethod
@pytest.fixture(name='middleware')
def fixture_middleware(load_cfg):
"""Fixture for returning middleware."""
> return SetupMiddleware()
E TypeError: MiddlewareMixin.__init__() missing 1 required positional argument: 'get_response'
plinth/tests/test_middleware.py:58: TypeError
From https://docs.djangoproject.com/en/4.0/releases/4.0/:
The get_response argument for django.utils.deprecation.MiddlewareMixin.__init__() is required and doesn’t accept None.