Add support for Django 4.2 in Djblets 5.
Review Request #13427 — Created Nov. 21, 2023 and submitted
Djblets 5 is based on Django 4.2 LTS, which has an End Of Life date of
April 1, 2026, and will be the last scheduled LTS release until
There are a handful of issues that needed to be fixed in order to
support Django 4.2, but they're all pretty minor. Some of these could
even be backported to earlier releases.
The following changes are made:
_clone_q()utility method no longer worked. It's been updated
to do a deepcopy, which is now supported by
The Conditions field widget tests had to be updated for changes to
form field HTML.
App and model management in
TestModelsLoaderMixinhad to have some
tweaks to avoid making some assumptions and to ensure population of
new installed apps.
mark_safe_lazy()had the wrong type mapped for results. This didn't
impact anything seriously before, but Django is now more sensitive to
it. This could be backported, but won't be just to ensure there are
no unforeseen regressions.
pytz.utcgenerated warnings in a unit test. We now use Django's
tests_appvalues were old and incorrect. They didn't break
anything before, but Django's more strict now about mappings. These
have been removed in order to use the correct default module for the
There are other fixes that will be coming for datetime/timezone imports
and staticfiles storage API. These currently generate warnings, but
otherwise work as before. We'll fix them to future-proof early in order
to ease testing with Django 5 down the road.
Installed in a new virtualenv and tested against all supported versions
of Python. All tests pass.