Skip to content

Commit 154aa62

Browse files
committed
Made cosmetic edits to docs/releases/6.0.txt.
1 parent eae8cc4 commit 154aa62

1 file changed

Lines changed: 42 additions & 47 deletions

File tree

docs/releases/6.0.txt

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ project.
1818
Python compatibility
1919
====================
2020

21-
Django 6.0 supports Python 3.12 and 3.13. We **highly recommend** and only
22-
officially support the latest release of each series.
21+
Django 6.0 supports Python 3.12 and 3.13. We **highly recommend**, and only
22+
officially support, the latest release of each series.
2323

2424
The Django 5.2.x series is the last to support Python 3.10 and 3.11.
2525

26-
Third-party library support for older version of Django
27-
=======================================================
26+
Third-party library support for older versions of Django
27+
========================================================
2828

2929
Following the release of Django 6.0, we suggest that third-party app authors
3030
drop support for all versions of Django prior to 5.2. At that time, you should
@@ -75,28 +75,11 @@ guidance, see the :ref:`CSP security overview <security-csp>` and the
7575
:doc:`reference docs </ref/csp>`, which include details about decorators to
7676
override or disable policies on a per-view basis.
7777

78-
Adoption of Python's modern email API
79-
-------------------------------------
80-
81-
Email handling in Django now uses Python's modern email API, introduced in
82-
Python 3.6. This API, centered around the
83-
:class:`email.message.EmailMessage` class, offers a cleaner and
84-
Unicode-friendly interface for composing and sending emails. It replaces use of
85-
Python's older legacy (``Compat32``) API, which relied on lower-level MIME
86-
classes (from :mod:`email.mime`) and required more manual handling of
87-
message structure and encoding.
88-
89-
Notably, the return type of the :meth:`EmailMessage.message()
90-
<django.core.mail.EmailMessage.message>` method is now an instance of Python's
91-
:class:`email.message.EmailMessage`. This supports the same API as the
92-
previous ``SafeMIMEText`` and ``SafeMIMEMultipart`` return types, but is not an
93-
instance of those now-deprecated classes.
94-
9578
Template Partials
9679
-----------------
9780

9881
The :ref:`Django Template Language <template-language-intro>` now supports
99-
:ref:`template partials <template-partials>` , making it easier to encapsulate
82+
:ref:`template partials <template-partials>`, making it easier to encapsulate
10083
and reuse small named fragments within a template file. The new tags
10184
:ttag:`{% partialdef %} <partialdef>` and :ttag:`{% partial %} <partial>`
10285
define a partial and render it, respectively.
@@ -137,19 +120,33 @@ Once defined, tasks can be enqueued through a configured backend::
137120
message="Hello there!",
138121
)
139122

140-
Backends are configured via the :setting:`TASKS` setting. Django provides
141-
two built-in backends, primarily for development and testing:
123+
Backends are configured via the :setting:`TASKS` setting. The :ref:`two
124+
built-in backends <task-available-backends>` included in this release are
125+
primarily intended for development and testing.
142126

143-
* :class:`~django.tasks.backends.immediate.ImmediateBackend`: executes tasks
144-
immediately in the same process.
145-
* :class:`~django.tasks.backends.dummy.DummyBackend`: stores tasks without
146-
running them, leaving results in the
147-
:attr:`~django.tasks.TaskResultStatus.READY` state.
148-
149-
Django only handles task creation and queuing; it does not provide a worker
127+
Django handles task creation and queuing but does not provide a worker
150128
mechanism to run tasks. Execution must be managed by external infrastructure,
151-
such as a separate process or service. See :doc:`/topics/tasks` for an
152-
overview, and the :doc:`Tasks reference </ref/tasks>` for API details.
129+
such as a separate process or service.
130+
131+
See :doc:`/topics/tasks` for an overview and the :doc:`Tasks reference
132+
</ref/tasks>` for API details.
133+
134+
Adoption of Python's modern email API
135+
-------------------------------------
136+
137+
Email handling in Django now uses Python's modern email API, introduced in
138+
Python 3.6. This API, centered around the
139+
:class:`email.message.EmailMessage` class, offers a cleaner and
140+
Unicode-friendly interface for composing and sending emails. It replaces use of
141+
Python's older legacy (``Compat32``) API, which relied on lower-level MIME
142+
classes (from :mod:`email.mime`) and required more manual handling of
143+
message structure and encoding.
144+
145+
Notably, the return type of the :meth:`EmailMessage.message()
146+
<django.core.mail.EmailMessage.message>` method is now an instance of Python's
147+
:class:`email.message.EmailMessage`. This supports the same API as the
148+
previous ``SafeMIMEText`` and ``SafeMIMEMultipart`` return types, but is not an
149+
instance of those now-deprecated classes.
153150

154151
Minor features
155152
--------------
@@ -343,13 +340,13 @@ backends.
343340
* ``DatabaseOperations.return_insert_columns()`` and
344341
``DatabaseOperations.fetch_returned_insert_rows()`` methods are renamed to
345342
``returning_columns()`` and ``fetch_returned_rows()``, respectively, to
346-
denote they can be used in the context ``UPDATE … RETURNING`` statements as
347-
well as ``INSERT … RETURNING``.
343+
denote they can be used in the context of ``UPDATE … RETURNING`` statements
344+
as well as ``INSERT … RETURNING``.
348345

349346
* The ``DatabaseOperations.fetch_returned_insert_columns()`` method is removed
350347
and the ``fetch_returned_rows()`` method replacing
351348
``fetch_returned_insert_rows()`` expects both a ``cursor`` and
352-
``returning_params`` to be provided just like
349+
``returning_params`` to be provided, just like
353350
``fetch_returned_insert_columns()`` did.
354351

355352
* If the database supports ``UPDATE … RETURNING`` statements, backends can set
@@ -402,7 +399,7 @@ Email
402399
``DEFAULT_AUTO_FIELD`` setting now defaults to ``BigAutoField``
403400
---------------------------------------------------------------
404401

405-
Since Django 3.2 when the :setting:`DEFAULT_AUTO_FIELD` setting was added,
402+
Since Django 3.2, when the :setting:`DEFAULT_AUTO_FIELD` setting was added,
406403
the default :djadmin:`startproject` template's ``settings.py`` contained::
407404

408405
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
@@ -418,11 +415,9 @@ In Django 6.0, :setting:`DEFAULT_AUTO_FIELD` now defaults to
418415
:class:`django.db.models.BigAutoField` and the aforementioned lines in the
419416
project and app templates are removed.
420417

421-
Most projects shouldn't be affected since there has been a system check warning
422-
since Django 3.2 if a project doesn't set :setting:`DEFAULT_AUTO_FIELD`:
423-
424-
**models.W042**: Auto-created primary key used when not defining a primary
425-
key type, by default ``django.db.models.AutoField``.
418+
Most projects shouldn't be affected, since Django 3.2 has raised the system
419+
check warning **models.W042** for projects that don't set
420+
:setting:`DEFAULT_AUTO_FIELD`.
426421

427422
If you haven't dealt with this warning by now, add
428423
``DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'`` to your project's
@@ -495,7 +490,7 @@ used parameters. Using positional arguments for these now emits a deprecation
495490
warning and will raise a :exc:`TypeError` when the deprecation period ends.
496491

497492
* All *optional* parameters (``fail_silently`` and later) must be passed as
498-
keyword arguments to :func:`get_connection`, :func:`mail_admins`,
493+
keyword arguments to :func:`get_connection`, :func:`mail_admins`,
499494
:func:`mail_managers`, :func:`send_mail`, and :func:`send_mass_mail`.
500495

501496
* All parameters must be passed as keyword arguments when creating an
@@ -581,7 +576,7 @@ to remove usage of these features.
581576

582577
* The ``FORMS_URLFIELD_ASSUME_HTTPS`` transitional setting is removed.
583578

584-
* The ``django.db.models.sql.datastructures.Join`` no longer fallback to
579+
* The ``django.db.models.sql.datastructures.Join`` no longer falls back to
585580
``get_joining_columns()``.
586581

587582
* The ``get_joining_columns()`` method of ``ForeignObject`` and
@@ -599,8 +594,8 @@ to remove usage of these features.
599594
* The ``get_prefetch_queryset()`` method of related managers and descriptors is
600595
removed.
601596

602-
* ``get_prefetcher()`` and ``prefetch_related_objects()`` no longer fallback to
603-
``get_prefetch_queryset()``.
597+
* ``get_prefetcher()`` and ``prefetch_related_objects()`` no longer fall back
598+
to ``get_prefetch_queryset()``.
604599

605600
See :ref:`deprecated-features-5.1` for details on these changes, including how
606601
to remove usage of these features.
@@ -612,7 +607,7 @@ to remove usage of these features.
612607
methods are removed.
613608

614609
* The undocumented ``django.utils.itercompat.is_iterable()`` function and the
615-
``django.utils.itercompat`` module is removed.
610+
``django.utils.itercompat`` module are removed.
616611

617612
* The ``django.contrib.gis.geoip2.GeoIP2.coords()`` method is removed.
618613

0 commit comments

Comments
 (0)