The Wire · Showcase
DJANGO QUERYSETS GET SMARTER ABOUT ALIASES, DJANGOPROJECT.COM STANDARDIZES ON UV
By RepoJournal · Filed · About Django
Django fixed a QuerySet optimization gap where pure field aliases weren't recognized as orderable, while the project website itself migrated to modern Python packaging with uv and pyproject.toml.
The Django team patched ticket #37278 [1][2], teaching QuerySet.totally_ordered to understand when an annotation is a pure alias to a field without transforms, which means the property can now return True instead of always False. This is a targeted fix that improves query optimization for a specific class of annotations. Over on the website front, djangoproject.com completed its modernization sprint by merging uv support with pyproject.toml [3][4], moving away from traditional pip workflows in favor of the faster, Python-native dependency resolver. The team opted for `uv export` instead of `uv pip compile` because it felt more aligned with uv's design philosophy, and settled on lock files without hashes after discovering pip install incompatibilities. Black also got a minor bump from v25.12.0 to v26.5.1 [5][6], with fixes from the new version applied. Across the three desks, 4 commits and 3 PRs landed in the last 24 hours.
One email a day. Unsubscribe in one click.
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. Read a past issue →
Action items
- → Review QuerySet alias handling in your custom annotations to verify totally_ordered behavior improves django/django [plan]
- → Track djangoproject.com's uv migration for patterns if you maintain Django-adjacent services django/djangoproject.com [monitor]
References
- [1] Fixed #37278 -- Made QuerySet.totally_ordered understand aliases to pure Col/ColPairs. ↗ django/django
- [2] Fixed #37278 -- Made QuerySet.totally_ordered understand aliases to pure Col/ColPairs. django/django
- [3] Add pyproject.toml and basic uv setup ↗ django/djangoproject.com
- [4] Add pyproject.toml and basic uv setup (#2465) django/djangoproject.com
- [5] Update `black` from v25.12.0 to v26.5.1 (#2773) django/djangoproject.com
- [6] Update `black` from v25.12.0 to v26.5.1 ↗ django/djangoproject.com