RepoJournal
Django

@django

Python's batteries-included web framework

Keep up with Django in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Python Full archive →

The Wire · Showcase

DJANGO STRIPS HARDCODED PRIMARY KEYS AHEAD OF NON-INTEGER ID SUPPORT

By RepoJournal · Filed · About Django

1 person shipped this

Django is systematically removing assumptions that primary keys must be integers, clearing the path for databases like MongoDB that use object IDs.

The framework removed hardcoded Site primary keys across the codebase [1], including a critical fix to runtests.py that now dynamically sets SITE_ID based on the database backend [2]. For MongoDB testing, this switches from hardcoded integer 1 to ObjectId('000000000000000000000001'), unblocking real-world usage of non-integer primary keys. The team also purged integer pk assumptions from AdminCustomQuerysetTest [3], with the same treatment applied elsewhere [4]. This isn't just cleanup. These changes signal Django is preparing for a world where UUIDs, ObjectIds, and other non-integer identifiers are first-class citizens, not edge cases. The deprecation roadmap is being updated to reflect this shift [5], giving extension developers and application authors clear guidance on what's coming. Benchmark infrastructure continues to mature across platforms [6], ensuring performance regressions get caught early.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Removed hardcoded Site pks. django/django
  2. [2] Removed hardcoded Site pks. ↗ django/django
  3. [3] Removed integer pk assumption in AdminCustomQuerysetTest. django/django
  4. [4] Removed integer pk assumption in AdminCustomQuerysetTest. ↗ django/django
  5. [5] Added advancing deprecations to preparing for next release instructions. django/django
  6. [6] Results for ubuntu-latest added [skip ci] django/django-asv

Quick answers

What shipped in Django on May 25, 2026?
Django is systematically removing assumptions that primary keys must be integers, clearing the path for databases like MongoDB that use object IDs. In total, 5 commits and 3 pull requests landed.
Who contributed to Django on May 25, 2026?
1 developer shipped this update, including timgraham.
What were the notable Django updates?
Removed hardcoded Site pks, Removed hardcoded Site pks, and Removed integer pk assumption in AdminCustomQuerysetTest.

More from @django

Daily updates, in your inbox

Follow Django

Keep up with Django in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?