You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
django.utils.deprecationModelAdmin.show_facets,django.contrib.admin.ShowFacetsenumBoundField.as_field_group(),django.forms.Field.template_name,django.forms.renderers.BaseRenderer.field_template_namedb_defaultarg and attr on modelFielddjango.contrib.admin.AdminSite.get_log_entriesdjango.http.HttpRequest.auserfromAuthenticationMiddlewaredjango.contrib.gis.db.models.functions.ClosestPointdjango.contrib.postgres.constraints.ExclusionConstraint.violation_error_codechoicesargs to formChoiceFieldand modelFieldsupportChoicesclasses directly.django.forms.URLFieldnewassume_schemeargQuerySet.update_or_createandaupdate_or_createnewcreate_defaultsargviolation_error_codearg forBaseConstraint,CheckConstraint, andUniqueConstrainterror_messagesfordjango.core.paginator.Paginator.error_messagesSignal.asend()andSignal.asend_robust()methodsinstanceargument of the undocumentedBaseModelFormSet.save_existing()method is renamed toobj.django.contrib.admin.helpers.checkboxis removed.Query.annotation_select_maskattribute is changed from a set of strings to an ordered list of strings.BaseConstraintis deprecated in favor of keyword-only arguments. (Let's make them keyword-only in the stubs in 5.0.)requestis added to the signature ofModelAdmin.lookup_allowed(). Support for ModelAdmin subclasses that do not accept this argument is deprecated.get_joining_columns()method ofForeignObjectandForeignObjectRelis deprecated. Starting with Django 6.0,django.db.models.sql.datastructures.Joinwill no longer fallback toget_joining_columns(). Subclasses should implementget_joining_fields()instead.django.utils.baseconvmodule is removed.django.utils.datetime_safemodule is removed.extra_testsargument forDiscoverRunner.build_suite()andDiscoverRunner.run_tests()is removed.USE_L10Nsetting is removed.pytztimezones is removed.is_dstargument 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()django.contrib.gis.admin.GeoModelAdminandOSMGeoAdminclasses are removed.BaseForm._html_output()method is removed.str, rather than aSafeString, when rendering anErrorDictandErrorListis removed.SitemapIndexItem.__str__()method is removed.nameargument ofdjango.utils.functional.cached_property()is removed.opclassesargument ofdjango.contrib.postgres.constraints.ExclusionConstraintis removed.errors=NonetoSimpleTestCase.assertFormError()andassertFormsetError()is removed.django.contrib.sessions.serializers.PickleSerializeris removed.created=Trueis required in the signature ofRemoteUserBackend.configure_user()subclasses.django.contrib.auth.views.LogoutViewanddjango.contrib.auth.views.logout_then_login()is removed.django.utils.timezone.utcalias todatetime.timezone.utcis removed.SimpleTestCase.assertFormError()andassertFormSetError()is no longer allowed.django.contrib.gis.admin.OpenLayersWidgetis removed.django.contrib.auth.hashers.CryptPasswordHasheris removed.nulls_first=Falseornulls_last=FalsetoExpression.asc()andExpression.desc()methods, and theOrderByexpression is no longer allowed.