4.0.txt 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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. * The default iteration count for the PBKDF2 password hasher is increased from
  31. 260,000 to 320,000.
  32. :mod:`django.contrib.contenttypes`
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34. * ...
  35. :mod:`django.contrib.gis`
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~
  37. * ...
  38. :mod:`django.contrib.messages`
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. * ...
  41. :mod:`django.contrib.postgres`
  42. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43. * ...
  44. :mod:`django.contrib.redirects`
  45. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  46. * ...
  47. :mod:`django.contrib.sessions`
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49. * ...
  50. :mod:`django.contrib.sitemaps`
  51. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. * ...
  53. :mod:`django.contrib.sites`
  54. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. * ...
  56. :mod:`django.contrib.staticfiles`
  57. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  58. * ...
  59. :mod:`django.contrib.syndication`
  60. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. * ...
  62. Cache
  63. ~~~~~
  64. * ...
  65. CSRF
  66. ~~~~
  67. * ...
  68. Decorators
  69. ~~~~~~~~~~
  70. * ...
  71. Email
  72. ~~~~~
  73. * ...
  74. Error Reporting
  75. ~~~~~~~~~~~~~~~
  76. * ...
  77. File Storage
  78. ~~~~~~~~~~~~
  79. * ...
  80. File Uploads
  81. ~~~~~~~~~~~~
  82. * ...
  83. Forms
  84. ~~~~~
  85. * ...
  86. Generic Views
  87. ~~~~~~~~~~~~~
  88. * ...
  89. Internationalization
  90. ~~~~~~~~~~~~~~~~~~~~
  91. * ...
  92. Logging
  93. ~~~~~~~
  94. * ...
  95. Management Commands
  96. ~~~~~~~~~~~~~~~~~~~
  97. * The :djadmin:`runserver` management command now supports the
  98. :option:`--skip-checks` option.
  99. Migrations
  100. ~~~~~~~~~~
  101. * ...
  102. Models
  103. ~~~~~~
  104. * ...
  105. Requests and Responses
  106. ~~~~~~~~~~~~~~~~~~~~~~
  107. * ...
  108. Security
  109. ~~~~~~~~
  110. * ...
  111. Serialization
  112. ~~~~~~~~~~~~~
  113. * ...
  114. Signals
  115. ~~~~~~~
  116. * ...
  117. Templates
  118. ~~~~~~~~~
  119. * ...
  120. Tests
  121. ~~~~~
  122. * ...
  123. URLs
  124. ~~~~
  125. * ...
  126. Utilities
  127. ~~~~~~~~~
  128. * ...
  129. Validators
  130. ~~~~~~~~~~
  131. * ...
  132. .. _backwards-incompatible-4.0:
  133. Backwards incompatible changes in 4.0
  134. =====================================
  135. Database backend API
  136. --------------------
  137. This section describes changes that may be needed in third-party database
  138. backends.
  139. * ...
  140. :mod:`django.contrib.gis`
  141. -------------------------
  142. * Support for PostGIS 2.3 is removed.
  143. Dropped support for PostgreSQL 9.6
  144. ----------------------------------
  145. Upstream support for PostgreSQL 9.6 ends in November 2021. Django 4.0 supports
  146. PostgreSQL 10 and higher.
  147. Miscellaneous
  148. -------------
  149. * ...
  150. .. _deprecated-features-4.0:
  151. Features deprecated in 4.0
  152. ==========================
  153. Miscellaneous
  154. -------------
  155. * ...
  156. Features removed in 4.0
  157. =======================
  158. These features have reached the end of their deprecation cycle and are removed
  159. in Django 4.0.
  160. See :ref:`deprecated-features-3.0` for details on these changes, including how
  161. to remove usage of these features.
  162. * ``django.utils.http.urlquote()``, ``urlquote_plus()``, ``urlunquote()``, and
  163. ``urlunquote_plus()`` are removed.
  164. * ``django.utils.encoding.force_text()`` and ``smart_text()`` are removed.
  165. * ``django.utils.translation.ugettext()``, ``ugettext_lazy()``,
  166. ``ugettext_noop()``, ``ungettext()``, and ``ungettext_lazy()`` are removed.
  167. * ``django.views.i18n.set_language()`` doesn't set the user language in
  168. ``request.session`` (key ``_language``).
  169. * ``alias=None`` is required in the signature of
  170. ``django.db.models.Expression.get_group_by_cols()`` subclasses.
  171. * ``django.utils.text.unescape_entities()`` is removed.
  172. * ``django.utils.http.is_safe_url()`` is removed.
  173. See :ref:`deprecated-features-3.1` for details on these changes, including how
  174. to remove usage of these features.
  175. * The ``PASSWORD_RESET_TIMEOUT_DAYS`` setting is removed.
  176. * The :lookup:`isnull` lookup no longer allows using non-boolean values as the
  177. right-hand side.
  178. * The ``django.db.models.query_utils.InvalidQuery`` exception class is removed.
  179. * The ``django-admin.py`` entry point is removed.
  180. * The ``HttpRequest.is_ajax()`` method is removed.
  181. * Support for the pre-Django 3.1 encoding format of cookies values used by
  182. ``django.contrib.messages.storage.cookie.CookieStorage`` is removed.
  183. * Support for the pre-Django 3.1 password reset tokens in the admin site (that
  184. use the SHA-1 hashing algorithm) is removed.
  185. * Support for the pre-Django 3.1 encoding format of sessions is removed.
  186. * Support for the pre-Django 3.1 ``django.core.signing.Signer`` signatures
  187. (encoded with the SHA-1 algorithm) is removed.
  188. * Support for the pre-Django 3.1 ``django.core.signing.dumps()`` signatures
  189. (encoded with the SHA-1 algorithm) in ``django.core.signing.loads()`` is
  190. removed.
  191. * Support for the pre-Django 3.1 user sessions (that use the SHA-1 algorithm)
  192. is removed.
  193. * The ``get_request`` argument for
  194. ``django.utils.deprecation.MiddlewareMixin.__init__()`` is required and
  195. doesn't accept ``None``.
  196. * The ``providing_args`` argument for ``django.dispatch.Signal`` is removed.
  197. * The ``length`` argument for ``django.utils.crypto.get_random_string()`` is
  198. required.
  199. * The ``list`` message for ``ModelMultipleChoiceField`` is removed.
  200. * Support for passing raw column aliases to ``QuerySet.order_by()`` is removed.
  201. * The ``NullBooleanField`` model field is removed, except for support in
  202. historical migrations.
  203. * ``django.conf.urls.url()`` is removed.
  204. * The ``django.contrib.postgres.fields.JSONField`` model field is removed,
  205. except for support in historical migrations.
  206. * ``django.contrib.postgres.fields.jsonb.KeyTransform`` and
  207. ``django.contrib.postgres.fields.jsonb.KeyTextTransform`` are removed.
  208. * ``django.contrib.postgres.forms.JSONField`` is removed.
  209. * The ``{% ifequal %}`` and ``{% ifnotequal %}`` template tags are removed.
  210. * The ``DEFAULT_HASHING_ALGORITHM`` transitional setting is removed.