Services
Blog
Français
django-autocomplete-light has two current release lines with different jobs: v4 exists to provide the documented upgrade path from v3 and across supported Django versions, while v5 is where we can take the larger backward compatibility breaks that unblock the next API.
This post clarifies what each line is for, which one you should install, and where to find the upgrade documentation.
If you are already using django-autocomplete-light 3.x in production, upgrade to v4 first.
Version 4 is the smaller breaking-change line from v3. It keeps the Select2 integration and the existing project shape, while adding support for modern Django versions. It is the release line to use while you upgrade a project from Django 4.2 to Django 5.2.
Version 5 is the breaking-change line. It contains the changes that should not have landed in a v4 patch release. It is for projects that are ready to adapt their customizations and move to the cleaner lifecycle, but the v5 API is still open to change if we can reduce the backward compatibility break surface.
The purpose of v4 is boring on purpose: it should make upgrades possible without forcing an application rewrite. It may still require code changes when coming from v3, but those changes should be documented and limited enough that projects can move forward incrementally.
In particular, v4 is the line for projects that need a django-autocomplete-light version spanning the Django LTS upgrade path. If your application still runs on Django 4.2 and you want to reach Django 5.2, v4 is the bridge release line.
That matters because upgrade paths should be incremental:
Use the v3 to v4 upgrade guide here:
https://django-autocomplete-light.readthedocs.io/en/master/upgrade_from_v3_to_v4.html
Version 5 is where the backward-incompatible changes belong.
The main point of v5 is to remove old object lifecycle management from the jQuery side of the project and simplify the Python and JavaScript integration surface going forward. That is useful work, but it is not a patch-level change: projects with custom JavaScript initialization, custom widgets, or Python overrides may need to adapt.
That said, v5 is not an excuse to break more than necessary. We are still open to changing the v5 API before it settles if a different shape preserves the goal while making existing customizations easier to port.
This is especially important for advanced customizations around selected option
rendering. For example, some projects use to_field_name="uuid" or filter
selected choices with uuid__in instead of pk__in. These customizations
should not require copying large blocks of internal widget code, so v5 is the
right place to improve the extension points.
Use the v4 to v5 upgrade guide here:
https://django-autocomplete-light.readthedocs.io/en/master/upgrade_from_v4_to_v5.html
The important point is that v4 exists so users have an incremental path between the current Django LTS versions before taking the larger v5 changes.
django-autocomplete-light 3.12.x
django-autocomplete-light 4.x
django-autocomplete-light 5.x
If you are upgrading both Django and django-autocomplete-light, the intended path is to move through v4 first. Do not jump directly from an old v3 project to v5 unless you are ready to handle both upgrade steps at once.
Use v4 if:
Use v5 if:
A backward-incompatible change was released as 4.0.1. That was a mistake.
It has been moved to the v5 line so projects pinned to v4 can stay on the
compatibility path.
The v4 line is now the place for the smaller v3-to-v4 upgrade path and compatibility fixes, including Django 4 support. The v5 line is the place for larger intentional breaking changes.
Going forward, the rule is simple:
If a release unexpectedly breaks your builds, please keep in mind that my phone number is present in the footer of this blog/site. The django-autocomplete-light README also has a section to help people reach me quickly in that situation. I really do want to know as soon as possible when a release breaks production upgrade paths, because that is the moment where a fast yank, patch, or clarification can save a lot of people time.
The upgrade pages are:
The compatibility table is documented here:
https://django-autocomplete-light.readthedocs.io/en/master/#compatibility
If something in the upgrade path is still unclear, please open an issue with the versions of Django and django-autocomplete-light you are running, the target versions, and any widget or JavaScript customizations involved. For v5 in particular, examples of customizations that became harder than necessary are useful: we can still change the API if that makes the upgrade path smaller.