Bumpwright

Guides

Django 4.2 LTS to 5.2 LTS: what to check

Django 4.2 is listed by the Django project as an unsupported release: its extended support ended on April 7, 2026. Django 5.2 is the next LTS, with extended support listed to April 2028. This guide covers what changed on the way, taken from the official release notes for 5.0, 5.1 and 5.2, and a test strategy for the move.

The short list

Python and database floors

DjangoPython versions it supports
4.23.8, 3.9, 3.10, 3.11, 3.12
5.03.10, 3.11, 3.12
5.13.10, 3.11, 3.12, 3.13 (as of 5.1.3)
5.23.10, 3.11, 3.12, 3.13, 3.14 (as of 5.2.8)

If your project runs on Python 3.8 or 3.9, the Python upgrade comes first, and it is its own change with its own test run. Database minimums also rose along the way, according to the release notes:

Your third-party packages (Django REST framework, django-filter, celery integrations and so on) have to support the new Django too. The Django upgrade guide says that in most cases you will need to upgrade Django-related dependencies as well, and that you may have to wait for a release if a dependency does not support the new version yet.

Removed in Django 5.0

These had finished their deprecation cycle; they were deprecated in Django 4.0 and 4.1, so a 4.2 project can still run them with warnings. In 5.0 they fail or change behaviour.

Removed in Django 5.1

These were deprecated in 4.2, so they are the removals that a 4.2 project sees warnings for today.

Removed in Django 5.2

We could not find a "features removed" section in the 5.2 release notes. What 5.2 does list as backwards incompatible is below.

Behaviour changes that do not raise errors

These come from the "backwards incompatible changes" sections of the release notes. They tend to show up as a test that fails oddly, or as production data that looks different.

Deprecations to clear now, before 6.0

These are deprecated in 5.0 and 5.1 and still work in 5.2 with warnings. Fixing them while you are in the code costs little and makes the next upgrade shorter. Examples from the release notes: the check argument of CheckConstraint (use condition), passing positional arguments to Model.save(), ModelAdmin.log_deletion(), format_html() called without arguments, the FORMS_URLFIELD_ASSUME_HTTPS setting (the default scheme for forms.URLField will change from http to https in 6.0), and cx_Oracle support.

A test strategy

  1. Record a baseline on 4.2. Run the full suite on the latest 4.2 patch and write down passes, failures and skips. If tests are red today, an upgrade cannot be judged against them.
  2. Turn warnings on, on the old version. Python hides deprecation warnings by default. The Django upgrade guide recommends python -Wa manage.py test (or PYTHONWARNINGS=always pytest) and says to resolve the warnings on your current version before upgrading. Warnings from installed packages may be harmless.
  3. Go through the feature releases. The guide says it is usually easier to upgrade through each feature release (here 4.2, then 5.0, then 5.1, then 5.2), using the latest patch of each, and recommends the same approach from one LTS to the next. You can pin and test each step in CI even if you only deploy 5.2.
  4. Upgrade the Django-related packages with each step, and run the suite with -Wa again. Fix failures; do not delete, skip or loosen tests to get green.
  5. Check migrations. makemigrations --check exits non-zero when model changes have no migration (it implies --dry-run). Run it before and after, and read any migration that appears, especially after the index_together change and for UUIDField on MariaDB.
  6. Run the deployment checks with django-admin check --deploy against your production settings module.
  7. Exercise what tests skip: logout links, admin pages, form rendering, file uploads and anything on the database engine you run in production if your tests use another.
  8. After deploy: the upgrade guide suggests clearing the cache, because cached objects are not guaranteed to be compatible across Django versions.

In our own test upgrades of open-source projects, the Django 4.2 to 5.2 moves we ran were small, because those projects already supported 5.2 and the work was moving CI and lockfiles and proving it. The one multi-LTS hop we tried (2.2 to 5.2) did not reach green in three attempts: it hit a removed index_together, a REST framework release that dropped a documentation view and added a new check, and a third-party package that changed a method signature. That is why a two-LTS jump is not offered yet.

Want this done for you?

Start with the $79 baseline check: we run your tests as they are today and report passes, failures and skips, with no code changed. If your project has at least 30 meaningful tests and CI that is green today, the fixed price for one Django LTS to the next (4.2 to 5.2) is $299, delivered as a pull request or patch. The same price covers moving the Python runtime to the current release when the framework moves at most one LTS. The baseline fee is credited to an upgrade ordered within 30 days. The delivery check is that your own tests pass at least as well as before, with none deleted, skipped or weakened, and every package we held back is listed with the reason. If we cannot deliver a result that meets it, you pay nothing beyond the baseline fee. Django jumps across two or more LTS releases are not offered yet; a baseline check is available for those. Green tests cover only what your tests cover, and we tell you where they do not reach.

Order a baseline check – $79 See pricing and scope

Sources

Written 2026-11-18 against the Django documentation as published that day. This guide lists the changes that most often matter; it is not a substitute for reading the release notes for your own code.