5.0.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. ============================================
  2. Django 5.0 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected December 2023*
  5. Welcome to Django 5.0!
  6. These release notes cover the :ref:`new features <whats-new-5.0>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-5.0>` you'll
  8. want to be aware of when upgrading from Django 4.2 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-5.0>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Python compatibility
  14. ====================
  15. Django 5.0 supports Python 3.10, 3.11, and 3.12. We **highly recommend** and
  16. only officially support the latest release of each series.
  17. Third-party library support for older version of Django
  18. =======================================================
  19. Following the release of Django 5.0, we suggest that third-party app authors
  20. drop support for all versions of Django prior to 4.2. At that time, you should
  21. be able to run your package's tests using ``python -Wd`` so that deprecation
  22. warnings appear. After making the deprecation warning fixes, your app should be
  23. compatible with Django 5.0.
  24. .. _whats-new-5.0:
  25. What's new in Django 5.0
  26. ========================
  27. Minor features
  28. --------------
  29. :mod:`django.contrib.admin`
  30. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31. * ...
  32. :mod:`django.contrib.admindocs`
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34. * ...
  35. :mod:`django.contrib.auth`
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  37. * ...
  38. :mod:`django.contrib.contenttypes`
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. * ...
  41. :mod:`django.contrib.gis`
  42. ~~~~~~~~~~~~~~~~~~~~~~~~~
  43. * ...
  44. :mod:`django.contrib.messages`
  45. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  46. * ...
  47. :mod:`django.contrib.postgres`
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49. * ...
  50. :mod:`django.contrib.redirects`
  51. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. * ...
  53. :mod:`django.contrib.sessions`
  54. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. * ...
  56. :mod:`django.contrib.sitemaps`
  57. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  58. * ...
  59. :mod:`django.contrib.sites`
  60. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. * ...
  62. :mod:`django.contrib.staticfiles`
  63. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. * ...
  65. :mod:`django.contrib.syndication`
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. * ...
  68. Cache
  69. ~~~~~
  70. * ...
  71. CSRF
  72. ~~~~
  73. * ...
  74. Decorators
  75. ~~~~~~~~~~
  76. * ...
  77. Email
  78. ~~~~~
  79. * ...
  80. Error Reporting
  81. ~~~~~~~~~~~~~~~
  82. * ...
  83. File Storage
  84. ~~~~~~~~~~~~
  85. * ...
  86. File Uploads
  87. ~~~~~~~~~~~~
  88. * ...
  89. Forms
  90. ~~~~~
  91. * ...
  92. Generic Views
  93. ~~~~~~~~~~~~~
  94. * ...
  95. Internationalization
  96. ~~~~~~~~~~~~~~~~~~~~
  97. * ...
  98. Logging
  99. ~~~~~~~
  100. * ...
  101. Management Commands
  102. ~~~~~~~~~~~~~~~~~~~
  103. * ...
  104. Migrations
  105. ~~~~~~~~~~
  106. * ...
  107. Models
  108. ~~~~~~
  109. * ...
  110. Requests and Responses
  111. ~~~~~~~~~~~~~~~~~~~~~~
  112. * ...
  113. Security
  114. ~~~~~~~~
  115. * ...
  116. Serialization
  117. ~~~~~~~~~~~~~
  118. * ...
  119. Signals
  120. ~~~~~~~
  121. * ...
  122. Templates
  123. ~~~~~~~~~
  124. * ...
  125. Tests
  126. ~~~~~
  127. * ...
  128. URLs
  129. ~~~~
  130. * ...
  131. Utilities
  132. ~~~~~~~~~
  133. * ...
  134. Validators
  135. ~~~~~~~~~~
  136. * ...
  137. .. _backwards-incompatible-5.0:
  138. Backwards incompatible changes in 5.0
  139. =====================================
  140. Database backend API
  141. --------------------
  142. This section describes changes that may be needed in third-party database
  143. backends.
  144. * ...
  145. Miscellaneous
  146. -------------
  147. * ...
  148. .. _deprecated-features-5.0:
  149. Features deprecated in 5.0
  150. ==========================
  151. Miscellaneous
  152. -------------
  153. * ...
  154. Features removed in 5.0
  155. =======================
  156. These features have reached the end of their deprecation cycle and are removed
  157. in Django 5.0.
  158. See :ref:`deprecated-features-4.0` for details on these changes, including how
  159. to remove usage of these features.
  160. * The ``SERIALIZE`` test setting is removed.
  161. * The undocumented ``django.utils.baseconv`` module is removed.
  162. * The undocumented ``django.utils.datetime_safe`` module is removed.
  163. * The default value of the ``USE_TZ`` setting is changed from ``False`` to
  164. ``True``.
  165. * The default sitemap protocol for sitemaps built outside the context of a
  166. request is changed from ``'http'`` to ``'https'``.
  167. * The ``extra_tests`` argument for ``DiscoverRunner.build_suite()`` and
  168. ``DiscoverRunner.run_tests()`` is removed.
  169. * The ``django.contrib.postgres.aggregates.ArrayAgg``, ``JSONBAgg``, and
  170. ``StringAgg`` aggregates no longer return ``[]``, ``[]``, and ``''``,
  171. respectively, when there are no rows.
  172. * The ``USE_L10N`` setting is removed.
  173. * The ``USE_DEPRECATED_PYTZ`` transitional setting is removed.
  174. * Support for ``pytz`` timezones is removed.
  175. * The ``is_dst`` argument is removed from:
  176. * ``QuerySet.datetimes()``
  177. * ``django.utils.timezone.make_aware()``
  178. * ``django.db.models.functions.Trunc()``
  179. * ``django.db.models.functions.TruncSecond()``
  180. * ``django.db.models.functions.TruncMinute()``
  181. * ``django.db.models.functions.TruncHour()``
  182. * ``django.db.models.functions.TruncDay()``
  183. * ``django.db.models.functions.TruncWeek()``
  184. * ``django.db.models.functions.TruncMonth()``
  185. * ``django.db.models.functions.TruncQuarter()``
  186. * ``django.db.models.functions.TruncYear()``
  187. * The ``django.contrib.gis.admin.GeoModelAdmin`` and ``OSMGeoAdmin`` classes
  188. are removed.
  189. * The undocumented ``BaseForm._html_output()`` method is removed.
  190. * The ability to return a ``str``, rather than a ``SafeString``, when rendering
  191. an ``ErrorDict`` and ``ErrorList`` is removed.
  192. See :ref:`deprecated-features-4.1` for details on these changes, including how
  193. to remove usage of these features.
  194. * The ``SitemapIndexItem.__str__()`` method is removed.
  195. * The ``CSRF_COOKIE_MASKED`` transitional setting is removed.
  196. * The ``name`` argument of ``django.utils.functional.cached_property()`` is
  197. removed.
  198. * The ``opclasses`` argument of
  199. ``django.contrib.postgres.constraints.ExclusionConstraint`` is removed.
  200. * The undocumented ability to pass ``errors=None`` to
  201. ``SimpleTestCase.assertFormError()`` and ``assertFormsetError()`` is removed.
  202. * ``django.contrib.sessions.serializers.PickleSerializer`` is removed.
  203. * The usage of ``QuerySet.iterator()`` on a queryset that prefetches related
  204. objects without providing the ``chunk_size`` argument is no longer allowed.
  205. * Passing unsaved model instances to related filters is no longer allowed.
  206. * ``created=True`` is required in the signature of
  207. ``RemoteUserBackend.configure_user()`` subclasses.
  208. * Support for logging out via ``GET`` requests in the
  209. ``django.contrib.auth.views.LogoutView`` and
  210. ``django.contrib.auth.views.logout_then_login()`` is removed.
  211. * The ``django.utils.timezone.utc`` alias to ``datetime.timezone.utc`` is
  212. removed.
  213. * Passing a response object and a form/formset name to
  214. ``SimpleTestCase.assertFormError()`` and ``assertFormSetError()`` is no
  215. longer allowed.
  216. * The ``django.contrib.gis.admin.OpenLayersWidget`` is removed.
  217. + The ``django.contrib.auth.hashers.CryptPasswordHasher`` is removed.
  218. * The ``"django/forms/default.html"`` and
  219. ``"django/forms/formsets/default.html"`` templates are removed.
  220. * The default form and formset rendering style is changed to the div-based.