Skip to content

Django 5.0 Tracking Issue #1493

Open
Open
@adamchainz

Description

@adamchainz

This is a tracking issue for changes that will be needed for Django 5.0, based on in-development release notes.

EDIT: Please see #1493 (comment) for an up to date progress list.

(Collapsed original list that is now outdated)
  • warnings in django.utils.deprecation
  • admin facets - ModelAdmin.show_facets, django.contrib.admin.ShowFacets enum
  • form field groups - BoundField.as_field_group(), django.forms.Field.template_name, django.forms.renderers.BaseRenderer.field_template_name
  • Database-computed default values - db_default arg and attr on model Field
  • django.contrib.admin.AdminSite.get_log_entries
  • django.http.HttpRequest.auser from AuthenticationMiddleware
  • django.contrib.gis.db.models.functions.ClosestPoint
  • django.contrib.postgres.constraints.ExclusionConstraint.violation_error_code
  • choices args to form ChoiceField and model Field support Choices classes directly.
  • django.forms.URLField new assume_scheme arg
  • QuerySet.update_or_create and aupdate_or_create new create_defaults arg
  • new violation_error_code arg for BaseConstraint, CheckConstraint, and UniqueConstraint
  • new arg error_messages for django.core.paginator.Paginator.error_messages
  • new Signal.asend() and Signal.asend_robust() methods
  • The instance argument of the undocumented BaseModelFormSet.save_existing() method is renamed to obj.
  • The undocumented django.contrib.admin.helpers.checkbox is removed.
  • The undocumented Query.annotation_select_mask attribute is changed from a set of strings to an ordered list of strings.
  • Passing positional arguments name and violation_error_message to BaseConstraint is deprecated in favor of keyword-only arguments. (Let's make them keyword-only in the stubs in 5.0.)
  • request is added to the signature of ModelAdmin.lookup_allowed(). Support for ModelAdmin subclasses that do not accept this argument is deprecated.
  • The get_joining_columns() method of ForeignObject and ForeignObjectRel is deprecated. Starting with Django 6.0, django.db.models.sql.datastructures.Join will no longer fallback to get_joining_columns(). Subclasses should implement get_joining_fields() instead.
  • The undocumented django.utils.baseconv module is removed.
  • The undocumented django.utils.datetime_safe module is removed.
  • The extra_tests argument for DiscoverRunner.build_suite() and DiscoverRunner.run_tests() is removed.
  • The USE_L10N setting is removed.
  • Support for pytz timezones is removed.
  • The is_dst argument is removed from:
    • QuerySet.datetimes()
    • django.utils.timezone.make_aware()
    • django.db.models.functions.Trunc()
    • django.db.models.functions.TruncSecond()
    • django.db.models.functions.TruncMinute()
    • django.db.models.functions.TruncHour()
    • django.db.models.functions.TruncDay()
    • django.db.models.functions.TruncWeek()
    • django.db.models.functions.TruncMonth()
    • django.db.models.functions.TruncQuarter()
    • django.db.models.functions.TruncYear()
  • The django.contrib.gis.admin.GeoModelAdmin and OSMGeoAdmin classes are removed.
  • [ ]The undocumented BaseForm._html_output() method is removed.
  • The ability to return a str, rather than a SafeString, when rendering an ErrorDict and ErrorList is removed.
  • The SitemapIndexItem.__str__() method is removed.
  • The name argument of django.utils.functional.cached_property() is removed.
  • The opclasses argument of django.contrib.postgres.constraints.ExclusionConstraint is removed.
  • The undocumented ability to pass errors=None to SimpleTestCase.assertFormError() and assertFormsetError() is removed.
  • django.contrib.sessions.serializers.PickleSerializer is removed.
  • created=True is required in the signature of RemoteUserBackend.configure_user() subclasses.
  • Support for logging out via GET requests in the django.contrib.auth.views.LogoutView and django.contrib.auth.views.logout_then_login() is removed.
  • The django.utils.timezone.utc alias to datetime.timezone.utc is removed.
  • Passing a response object and a form/formset name to SimpleTestCase.assertFormError() and assertFormSetError() is no longer allowed.
  • The django.contrib.gis.admin.OpenLayersWidget is removed.
  • The django.contrib.auth.hashers.CryptPasswordHasher is removed.
  • Passing nulls_first=False or nulls_last=False to Expression.asc() and Expression.desc() methods, and the OrderBy expression is no longer allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions