4.0.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. ============================================
  2. Django 4.0 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected December 2021*
  5. Welcome to Django 4.0!
  6. These release notes cover the :ref:`new features <whats-new-4.0>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-4.0>` you'll
  8. want to be aware of when upgrading from Django 3.2 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-4.0>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Python compatibility
  14. ====================
  15. Django 4.0 supports Python 3.8, 3.9, and 3.10. We **highly recommend** and only
  16. officially support the latest release of each series.
  17. .. _whats-new-4.0:
  18. What's new in Django 4.0
  19. ========================
  20. Minor features
  21. --------------
  22. :mod:`django.contrib.admin`
  23. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  24. * ...
  25. :mod:`django.contrib.admindocs`
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. * ...
  28. :mod:`django.contrib.auth`
  29. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. * ...
  31. :mod:`django.contrib.contenttypes`
  32. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. * ...
  34. :mod:`django.contrib.gis`
  35. ~~~~~~~~~~~~~~~~~~~~~~~~~
  36. * ...
  37. :mod:`django.contrib.messages`
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. * ...
  40. :mod:`django.contrib.postgres`
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. * ...
  43. :mod:`django.contrib.redirects`
  44. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. * ...
  46. :mod:`django.contrib.sessions`
  47. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. * ...
  49. :mod:`django.contrib.sitemaps`
  50. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  51. * ...
  52. :mod:`django.contrib.sites`
  53. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54. * ...
  55. :mod:`django.contrib.staticfiles`
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. * ...
  58. :mod:`django.contrib.syndication`
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. * ...
  61. Cache
  62. ~~~~~
  63. * ...
  64. CSRF
  65. ~~~~
  66. * ...
  67. Decorators
  68. ~~~~~~~~~~
  69. * ...
  70. Email
  71. ~~~~~
  72. * ...
  73. Error Reporting
  74. ~~~~~~~~~~~~~~~
  75. * ...
  76. File Storage
  77. ~~~~~~~~~~~~
  78. * ...
  79. File Uploads
  80. ~~~~~~~~~~~~
  81. * ...
  82. Forms
  83. ~~~~~
  84. * ...
  85. Generic Views
  86. ~~~~~~~~~~~~~
  87. * ...
  88. Internationalization
  89. ~~~~~~~~~~~~~~~~~~~~
  90. * ...
  91. Logging
  92. ~~~~~~~
  93. * ...
  94. Management Commands
  95. ~~~~~~~~~~~~~~~~~~~
  96. * ...
  97. Migrations
  98. ~~~~~~~~~~
  99. * ...
  100. Models
  101. ~~~~~~
  102. * ...
  103. Requests and Responses
  104. ~~~~~~~~~~~~~~~~~~~~~~
  105. * ...
  106. Security
  107. ~~~~~~~~
  108. * ...
  109. Serialization
  110. ~~~~~~~~~~~~~
  111. * ...
  112. Signals
  113. ~~~~~~~
  114. * ...
  115. Templates
  116. ~~~~~~~~~
  117. * ...
  118. Tests
  119. ~~~~~
  120. * ...
  121. URLs
  122. ~~~~
  123. * ...
  124. Utilities
  125. ~~~~~~~~~
  126. * ...
  127. Validators
  128. ~~~~~~~~~~
  129. * ...
  130. .. _backwards-incompatible-4.0:
  131. Backwards incompatible changes in 4.0
  132. =====================================
  133. Database backend API
  134. --------------------
  135. This section describes changes that may be needed in third-party database
  136. backends.
  137. * ...
  138. Miscellaneous
  139. -------------
  140. * ...
  141. .. _deprecated-features-4.0:
  142. Features deprecated in 4.0
  143. ==========================
  144. Miscellaneous
  145. -------------
  146. * ...
  147. Features removed in 4.0
  148. =======================
  149. These features have reached the end of their deprecation cycle and are removed
  150. in Django 4.0.
  151. See :ref:`deprecated-features-3.0` for details on these changes, including how
  152. to remove usage of these features.
  153. * ``django.utils.http.urlquote()``, ``urlquote_plus()``, ``urlunquote()``, and
  154. ``urlunquote_plus()`` are removed.
  155. * ``django.utils.encoding.force_text()`` and ``smart_text()`` are removed.
  156. * ``django.utils.translation.ugettext()``, ``ugettext_lazy()``,
  157. ``ugettext_noop()``, ``ungettext()``, and ``ungettext_lazy()`` are removed.
  158. * ``django.views.i18n.set_language()`` doesn't set the user language in
  159. ``request.session`` (key ``_language``).
  160. * ``alias=None`` is required in the signature of
  161. ``django.db.models.Expression.get_group_by_cols()`` subclasses.
  162. * ``django.utils.text.unescape_entities()`` is removed.
  163. * ``django.utils.http.is_safe_url()`` is removed.
  164. See :ref:`deprecated-features-3.1` for details on these changes, including how
  165. to remove usage of these features.
  166. * The ``PASSWORD_RESET_TIMEOUT_DAYS`` setting is removed.
  167. * The :lookup:`isnull` lookup no longer allows using non-boolean values as the
  168. right-hand side.
  169. * The ``django.db.models.query_utils.InvalidQuery`` exception class is removed.
  170. * The ``django-admin.py`` entry point is removed.
  171. * The ``HttpRequest.is_ajax()`` method is removed.
  172. * Support for the pre-Django 3.1 encoding format of cookies values used by
  173. ``django.contrib.messages.storage.cookie.CookieStorage`` is removed.
  174. * Support for the pre-Django 3.1 password reset tokens in the admin site (that
  175. use the SHA-1 hashing algorithm) is removed.
  176. * Support for the pre-Django 3.1 encoding format of sessions is removed.
  177. * Support for the pre-Django 3.1 ``django.core.signing.Signer`` signatures
  178. (encoded with the SHA-1 algorithm) is removed.
  179. * Support for the pre-Django 3.1 ``django.core.signing.dumps()`` signatures
  180. (encoded with the SHA-1 algorithm) in ``django.core.signing.loads()`` is
  181. removed.
  182. * Support for the pre-Django 3.1 user sessions (that use the SHA-1 algorithm)
  183. is removed.
  184. * The ``get_request`` argument for
  185. ``django.utils.deprecation.MiddlewareMixin.__init__()`` is required and
  186. doesn't accept ``None``.
  187. * The ``providing_args`` argument for ``django.dispatch.Signal`` is removed.
  188. * The ``length`` argument for ``django.utils.crypto.get_random_string()`` is
  189. required.
  190. * The ``list`` message for ``ModelMultipleChoiceField`` is removed.
  191. * Support for passing raw column aliases to ``QuerySet.order_by()`` is removed.
  192. * The ``NullBooleanField`` model field is removed, except for support in
  193. historical migrations.
  194. * ``django.conf.urls.url()`` is removed.
  195. * The ``django.contrib.postgres.fields.JSONField`` model field is removed,
  196. except for support in historical migrations.
  197. * ``django.contrib.postgres.fields.jsonb.KeyTransform`` and
  198. ``django.contrib.postgres.fields.jsonb.KeyTextTransform`` are removed.
  199. * ``django.contrib.postgres.forms.JSONField`` is removed.
  200. * The ``{% ifequal %}`` and ``{% ifnotequal %}`` template tags are removed.
  201. * The ``DEFAULT_HASHING_ALGORITHM`` transitional setting is removed.