Django 4.2.1 release notes

Expected May 1, 2023

Django 4.2.1 fixes several bugs in 4.2.

Bugfixes

  • Fixed a regression in Django 4.2 that caused a crash of QuerySet.defer() when deferring fields by attribute names (#34458).
  • Fixed a regression in Django 4.2 that caused a crash of SearchVector function with % characters (#34459).
  • Fixed a regression in Django 4.2 that caused aggregation over query that uses explicit grouping to group against the wrong columns (#34464).
  • Reallowed, following a regression in Django 4.2, setting the "cursor_factory" option in OPTIONS on PostgreSQL (#34466).
  • Enforced UTF-8 client encoding on PostgreSQL, following a regression in Django 4.2 (#34470).
  • Fixed a regression in Django 4.2 where i18n_patterns() didn’t respect the prefix_default_language argument when a fallback language of the default language was used (#34455).
  • Fixed a regression in Django 4.2 where creating copies and deep copies of HttpRequest, HttpResponse, and their subclasses didn’t always work correctly (#34482, #34484).
  • Fixed a regression in Django 4.2 where timesince and timeuntil template filters returned incorrect results for a datetime with a non-UTC timezone when a time difference is less than 1 day (#34483).
  • Fixed a regression in Django 4.2 that caused a crash of SearchHeadline function with psycopg 3 (#34486).
  • Fixed a regression in Django 4.2 that caused incorrect ClearableFileInput margins in the admin (#34506).