4.1.txt 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. ============================================
  2. Django 4.1 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected August 2022*
  5. Welcome to Django 4.1!
  6. These release notes cover the :ref:`new features <whats-new-4.1>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-4.1>` you'll
  8. want to be aware of when upgrading from Django 4.0 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-4.1>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Python compatibility
  14. ====================
  15. Django 4.1 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.1:
  18. What's new in Django 4.1
  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. 320,000 to 390,000.
  32. :mod:`django.contrib.contenttypes`
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  34. * ...
  35. :mod:`django.contrib.gis`
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~
  37. * The new :meth:`.GEOSGeometry.make_valid()` method allows converting invalid
  38. geometries to valid ones.
  39. :mod:`django.contrib.messages`
  40. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41. * ...
  42. :mod:`django.contrib.postgres`
  43. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  44. * The new :class:`BitXor() <django.contrib.postgres.aggregates.BitXor>`
  45. aggregate function returns an ``int`` of the bitwise ``XOR`` of all non-null
  46. input values.
  47. * :class:`~django.contrib.postgres.indexes.SpGistIndex` now supports covering
  48. indexes on PostgreSQL 14+.
  49. * :class:`~django.contrib.postgres.constraints.ExclusionConstraint` now
  50. supports covering exclusion constraints using SP-GiST indexes on PostgreSQL
  51. 14+.
  52. :mod:`django.contrib.redirects`
  53. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54. * ...
  55. :mod:`django.contrib.sessions`
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. * ...
  58. :mod:`django.contrib.sitemaps`
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. * The default sitemap index template ``<sitemapindex>`` now includes the
  61. ``<lastmod>`` timestamp where available, through the new
  62. :meth:`~django.contrib.sitemaps.Sitemap.get_latest_lastmod` method. Custom
  63. sitemap index templates should be updated for the adjusted :ref:`context
  64. variables <sitemap-index-context-variables>`.
  65. :mod:`django.contrib.sites`
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. * ...
  68. :mod:`django.contrib.staticfiles`
  69. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  70. * ...
  71. :mod:`django.contrib.syndication`
  72. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73. * ...
  74. Cache
  75. ~~~~~
  76. * ...
  77. CSRF
  78. ~~~~
  79. * ...
  80. Decorators
  81. ~~~~~~~~~~
  82. * ...
  83. Email
  84. ~~~~~
  85. * ...
  86. Error Reporting
  87. ~~~~~~~~~~~~~~~
  88. * ...
  89. File Storage
  90. ~~~~~~~~~~~~
  91. * ...
  92. File Uploads
  93. ~~~~~~~~~~~~
  94. * ...
  95. Forms
  96. ~~~~~
  97. * ...
  98. Generic Views
  99. ~~~~~~~~~~~~~
  100. * ...
  101. Internationalization
  102. ~~~~~~~~~~~~~~~~~~~~
  103. * ...
  104. Logging
  105. ~~~~~~~
  106. * ...
  107. Management Commands
  108. ~~~~~~~~~~~~~~~~~~~
  109. * :option:`makemigrations --no-input` now logs default answers and reasons why
  110. migrations cannot be created.
  111. Migrations
  112. ~~~~~~~~~~
  113. * ...
  114. Models
  115. ~~~~~~
  116. * ...
  117. Requests and Responses
  118. ~~~~~~~~~~~~~~~~~~~~~~
  119. * ...
  120. Security
  121. ~~~~~~~~
  122. * ...
  123. Serialization
  124. ~~~~~~~~~~~~~
  125. * ...
  126. Signals
  127. ~~~~~~~
  128. * ...
  129. Templates
  130. ~~~~~~~~~
  131. * ...
  132. Tests
  133. ~~~~~
  134. * ...
  135. URLs
  136. ~~~~
  137. * ...
  138. Utilities
  139. ~~~~~~~~~
  140. * ...
  141. Validators
  142. ~~~~~~~~~~
  143. * ...
  144. .. _backwards-incompatible-4.1:
  145. Backwards incompatible changes in 4.1
  146. =====================================
  147. Database backend API
  148. --------------------
  149. This section describes changes that may be needed in third-party database
  150. backends.
  151. * ...
  152. Dropped support for MariaDB 10.2
  153. --------------------------------
  154. Upstream support for MariaDB 10.2 ends in May 2022. Django 4.1 supports MariaDB
  155. 10.3 and higher.
  156. Miscellaneous
  157. -------------
  158. * ...
  159. .. _deprecated-features-4.1:
  160. Features deprecated in 4.1
  161. ==========================
  162. Miscellaneous
  163. -------------
  164. * The context for sitemap index templates of a flat list of URLs is deprecated.
  165. Custom sitemap index templates should be updated for the adjusted
  166. :ref:`context variables <sitemap-index-context-variables>`, expecting a list
  167. of objects with ``location`` and optional ``lastmod`` attributes.
  168. Features removed in 4.1
  169. =======================
  170. These features have reached the end of their deprecation cycle and are removed
  171. in Django 4.1.
  172. See :ref:`deprecated-features-3.2` for details on these changes, including how
  173. to remove usage of these features.
  174. * Support for assigning objects which don't support creating deep copies with
  175. ``copy.deepcopy()`` to class attributes in ``TestCase.setUpTestData()`` is
  176. removed.
  177. * Support for using a boolean value in
  178. :attr:`.BaseCommand.requires_system_checks` is removed.
  179. * The ``whitelist`` argument and ``domain_whitelist`` attribute of
  180. ``django.core.validators.EmailValidator`` are removed.
  181. * The ``default_app_config`` application configuration variable is removed.
  182. * ``TransactionTestCase.assertQuerysetEqual()`` no longer calls ``repr()`` on a
  183. queryset when compared to string values.
  184. * The ``django.core.cache.backends.memcached.MemcachedCache`` backend is
  185. removed.
  186. * Support for the pre-Django 3.2 format of messages used by
  187. ``django.contrib.messages.storage.cookie.CookieStorage`` is removed.