4.2.txt 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. ============================================
  2. Django 4.2 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected April 2023*
  5. Welcome to Django 4.2!
  6. These release notes cover the :ref:`new features <whats-new-4.2>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-4.2>` you'll
  8. want to be aware of when upgrading from Django 4.1 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-4.2>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Python compatibility
  14. ====================
  15. Django 4.2 supports Python 3.8, 3.9, 3.10, and 3.11. We **highly recommend**
  16. and only officially support the latest release of each series.
  17. .. _whats-new-4.2:
  18. What's new in Django 4.2
  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. 390,000 to 480,000.
  32. :mod:`django.contrib.contenttypes`
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34. * ...
  35. :mod:`django.contrib.gis`
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~
  37. * The :doc:`GeoJSON serializer </ref/contrib/gis/serializers>` now outputs the
  38. ``id`` key for serialized features, which defaults to the primary key of
  39. objects.
  40. :mod:`django.contrib.messages`
  41. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. * ...
  43. :mod:`django.contrib.postgres`
  44. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. * The new :lookup:`trigram_strict_word_similar` lookup, and the
  46. :class:`TrigramStrictWordSimilarity()
  47. <django.contrib.postgres.search.TrigramStrictWordSimilarity>` and
  48. :class:`TrigramStrictWordDistance()
  49. <django.contrib.postgres.search.TrigramStrictWordDistance>` expressions allow
  50. using trigram strict word similarity.
  51. :mod:`django.contrib.redirects`
  52. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  53. * ...
  54. :mod:`django.contrib.sessions`
  55. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. * ...
  57. :mod:`django.contrib.sitemaps`
  58. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  59. * ...
  60. :mod:`django.contrib.sites`
  61. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62. * ...
  63. :mod:`django.contrib.staticfiles`
  64. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65. * ...
  66. :mod:`django.contrib.syndication`
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. * ...
  69. Cache
  70. ~~~~~
  71. * ...
  72. CSRF
  73. ~~~~
  74. * ...
  75. Decorators
  76. ~~~~~~~~~~
  77. * ...
  78. Email
  79. ~~~~~
  80. * ...
  81. Error Reporting
  82. ~~~~~~~~~~~~~~~
  83. * ...
  84. File Storage
  85. ~~~~~~~~~~~~
  86. * ...
  87. File Uploads
  88. ~~~~~~~~~~~~
  89. * ...
  90. Forms
  91. ~~~~~
  92. * ...
  93. Generic Views
  94. ~~~~~~~~~~~~~
  95. * ...
  96. Internationalization
  97. ~~~~~~~~~~~~~~~~~~~~
  98. * ...
  99. Logging
  100. ~~~~~~~
  101. * ...
  102. Management Commands
  103. ~~~~~~~~~~~~~~~~~~~
  104. * :djadmin:`makemessages` command now supports locales with private sub-tags
  105. such as ``nl_NL-x-informal``.
  106. * The new :option:`makemigrations --update` option merges model changes into
  107. the latest migration and optimizes the resulting operations.
  108. Migrations
  109. ~~~~~~~~~~
  110. * ...
  111. Models
  112. ~~~~~~
  113. * ...
  114. Requests and Responses
  115. ~~~~~~~~~~~~~~~~~~~~~~
  116. * ...
  117. Security
  118. ~~~~~~~~
  119. * ...
  120. Serialization
  121. ~~~~~~~~~~~~~
  122. * ...
  123. Signals
  124. ~~~~~~~
  125. * ...
  126. Templates
  127. ~~~~~~~~~
  128. * ...
  129. Tests
  130. ~~~~~
  131. * ...
  132. URLs
  133. ~~~~
  134. * ...
  135. Utilities
  136. ~~~~~~~~~
  137. * The new ``encoder`` parameter for :meth:`django.utils.html.json_script`
  138. function allows customizing a JSON encoder class.
  139. Validators
  140. ~~~~~~~~~~
  141. * ...
  142. .. _backwards-incompatible-4.2:
  143. Backwards incompatible changes in 4.2
  144. =====================================
  145. Database backend API
  146. --------------------
  147. This section describes changes that may be needed in third-party database
  148. backends.
  149. * ...
  150. Dropped support for MariaDB 10.3
  151. --------------------------------
  152. Upstream support for MariaDB 10.3 ends in May 2023. Django 4.2 supports MariaDB
  153. 10.4 and higher.
  154. Dropped support for PostgreSQL 11
  155. ---------------------------------
  156. Upstream support for PostgreSQL 11 ends in November 2023. Django 4.2 supports
  157. PostgreSQL 12 and higher.
  158. Miscellaneous
  159. -------------
  160. * The undocumented ``SimpleTemplateResponse.rendering_attrs`` and
  161. ``TemplateResponse.rendering_attrs`` are renamed to ``non_picklable_attrs``.
  162. .. _deprecated-features-4.2:
  163. Features deprecated in 4.2
  164. ==========================
  165. Miscellaneous
  166. -------------
  167. * The ``BaseUserManager.make_random_password()`` method is deprecated. See
  168. `recipes and best practices
  169. <https://docs.python.org/3/library/secrets.html#recipes-and-best-practices>`_
  170. for using Python's :py:mod:`secrets` module to generate passwords.