Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Staying on a Supported Version

Last updated:

Staying current is cheaper than catching up

Django has a defined release and support cycle. An application several versions behind cannot be upgraded in one step, because every third-party package has also moved.

Upgrading annually is a few days. Upgrading after four years is a project, and it is one nobody has budgeted for.

The order

  1. Get the tests passing on the current version first
  2. Fix the deprecation warnings the current version reports
  3. Upgrade one major version, not several
  4. Update third-party packages that require it
  5. Run the full test suite and check manually

Deprecation warnings on the current version are the upgrade instructions for the next one. Clearing them first makes the upgrade largely uneventful.

Third-party packages are the usual obstacle

  • Check each dependency supports the target version before starting
  • An unmaintained package that does not is a decision point
  • Replacing it may be part of the upgrade
  • Fewer dependencies means easier upgrades, which is one more argument for restraint

Test on production-like data

TestCatches
Full test suiteCode-level breakage
Migrations on a production-sized copyLong-running migrations
Manual check of key workflowsBehaviour changes tests miss
Performance comparisonRegressions
Third-party integrationsPackage incompatibilities

Plan it, do not wait for it

Put the upgrade in the plan annually, before support ends. Upgrading on a schedule is routine; upgrading because support ended is urgent and disruptive.

It is also considerably cheaper, which is the argument that usually gets it budgeted.

Frequently asked questions

How often should we upgrade?

At least annually, staying on a supported release. Long-term support versions give more time between upgrades.

What if a package is unmaintained?

Replace it or fork it. An unmaintained dependency will eventually block an upgrade you cannot avoid.

How long does an upgrade take?

A few days if current, considerably longer if several versions behind.

Can we skip versions?

Not safely. One major version at a time, with tests passing between.

Keep reading

Several Django versions behind?

It gets harder every year. Happy to assess what catching up would involve.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning