The Wire · Showcase
DJANGO CLEANS UP DEPRECATION WARNINGS, MOVES MIDDLEWAREMIXIN
By RepoJournal · Filed · About Django
Django fixed a critical issue where deprecation warnings pointed to the wrong code, while quietly relocating MiddlewareMixin to its proper home.
The core team implemented a new `warn_about_implementation()` utility [1] that fixes a longstanding problem: ModelAdmin deprecation warnings were pointing developers to wsgiref instead of their own deprecated code [2]. This affects three high-impact deprecations on `get_list_select_related()`, `get_actions()`, and `get_action_choices()` [3], ensuring developers actually see where they need to fix things. Separately, MiddlewareMixin has been moved out of `django.utils.deprecation` and into the middleware package [4], with backward compatibility maintained for the old import path [5]. On the djangoproject.com side, dependency maintenance continues with black 26.5.1 fixing unstable formatting on annotated assignments [6], pymdown-extensions 11.0.1 patching regex inefficiencies [7], and routine updates to sentry-sdk [8] and Pillow 12.3.0 [9].
Action items
- → Review ModelAdmin deprecation warnings if you subclass it - they now point to your code instead of framework internals django/django [plan]
- → Update internal imports of MiddlewareMixin to use django.middleware instead of django.utils.deprecation django/django [plan]
- → Upgrade black to 26.5.1+ in your linting pipeline if you use annotated assignments with comments django/djangoproject.com [monitor]
References
- [1] Refs #37187 -- Implemented warn_about_implementation() deprecation utility. django/django
- [2] Fixed #37187, #37190 -- Pointed ModelAdmin warnings to the deprecated code. ↗ django/django
- [3] Fixed #37187, #37190 -- Pointed ModelAdmin warnings to the deprecated code. django/django
- [4] Fixed #37178 -- Moved MiddlewareMixin out of utils.deprecation. ↗ django/django
- [5] Fixed #37178 -- Moved MiddlewareMixin out of utils.deprecation. django/django
- [6] Bump black from 26.3.1 to 26.5.1 in /requirements ↗ django/djangoproject.com
- [7] Bump pymdown-extensions from 10.21.3 to 11.0.1 in /requirements ↗ django/djangoproject.com
- [8] Bump sentry-sdk from 2.63.0 to 2.64.0 in /requirements ↗ django/djangoproject.com
- [9] Bump pillow from 12.2.0 to 12.3.0 in /requirements ↗ django/djangoproject.com