RepoJournal
Django

@django

Python's batteries-included web framework

Pick a date

The Wire · Showcase

DJANGO DEPRECATES SELECT_RELATED() WITH NO ARGUMENTS

By RepoJournal · Filed · About Django

Django is removing the footgun of calling `select_related()` without arguments, forcing developers to be explicit about which relations they want to optimize.

The main event is a deprecation wave [1] that closes off a common mistake: calling `QuerySet.select_related()` with no args used to load every relation, defeating the purpose of the method entirely. This lands alongside a companion deprecation [2] that removes the corresponding `ModelAdmin.list_select_related = True` shortcut, which had the same problem. The infrastructure work behind this is solid—the team also removed unnecessary ordering from compound queries [3] and cleaned up test dependencies on generated columns [4], both of which reduce unnecessary database operations. On the admin side, hardcoded primary keys are gone from permission tests [5], making the test suite more maintainable as it scales. Benchmark infrastructure is tracking performance across ubuntu-latest [6], so you'll see the real-world impact of these changes roll in.

Action items

References

  1. [1] Fixed #36593 -- Deprecated QuerySet.select_related() with no arguments. ↗ django/django
  2. [2] Refs #36593 -- Deprecated setting ModelAdmin.list_select_related to True. django/django
  3. [3] Fixed #36938 -- Removed unnecessary ordering from compound queries. django/django
  4. [4] Removed constraints' test_validate_nullable_condition dependency on generated columns. django/django
  5. [5] Removed hardcoded pks in AdminViewPermissionsTest. django/django
  6. [6] Results for ubuntu-latest added [skip ci] django/django-asv

FAQ

What changed in Django on May 12, 2026?
Django is removing the footgun of calling `select_related()` without arguments, forcing developers to be explicit about which relations they want to optimize.
What should Django teams do about it?
Audit your codebase for bare select_related() calls before the next Django LTS • Check ModelAdmin subclasses for list_select_related = True and replace with explicit tuples
Which Django repositories shipped on May 12, 2026?
django/django, django/django-asv

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.