2.2.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. ============================================
  2. Django 2.2 release notes - UNDER DEVELOPMENT
  3. ============================================
  4. *Expected April 2019*
  5. Welcome to Django 2.2!
  6. These release notes cover the :ref:`new features <whats-new-2.2>`, as well as
  7. some :ref:`backwards incompatible changes <backwards-incompatible-2.2>` you'll
  8. want to be aware of when upgrading from Django 2.1 or earlier. We've
  9. :ref:`begun the deprecation process for some features
  10. <deprecated-features-2.2>`.
  11. See the :doc:`/howto/upgrade-version` guide if you're updating an existing
  12. project.
  13. Django 2.2 is designated as a :term:`long-term support release`. It will
  14. receive security updates for at least three years after its release. Support
  15. for the previous LTS, Django 1.11, will end in April 2020.
  16. Python compatibility
  17. ====================
  18. Django 2.2 supports Python 3.5, 3.6, and 3.7. We **highly recommend** and only
  19. officially support the latest release of each series.
  20. .. _whats-new-2.2:
  21. What's new in Django 2.2
  22. ========================
  23. Check Constraints
  24. -----------------
  25. The new :class:`~django.db.models.CheckConstraint` class enables adding custom
  26. database constraints. Constraints are added to models using the
  27. :attr:`Meta.constraints <django.db.models.Options.constraints>` option.
  28. Minor features
  29. --------------
  30. :mod:`django.contrib.admin`
  31. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  32. * ...
  33. :mod:`django.contrib.admindocs`
  34. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35. * ...
  36. :mod:`django.contrib.auth`
  37. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. * ...
  39. :mod:`django.contrib.contenttypes`
  40. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41. * ...
  42. :mod:`django.contrib.gis`
  43. ~~~~~~~~~~~~~~~~~~~~~~~~~
  44. * Added Oracle support for the
  45. :class:`~django.contrib.gis.db.models.functions.Envelope` function.
  46. * Added SpatiaLite support for the :lookup:`coveredby` and :lookup:`covers`
  47. lookups.
  48. :mod:`django.contrib.messages`
  49. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50. * ...
  51. :mod:`django.contrib.postgres`
  52. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  53. * The new ``ordering`` argument for
  54. :class:`~django.contrib.postgres.aggregates.ArrayAgg` and
  55. :class:`~django.contrib.postgres.aggregates.StringAgg` determines the
  56. ordering of the aggregated elements.
  57. :mod:`django.contrib.redirects`
  58. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  59. * ...
  60. :mod:`django.contrib.sessions`
  61. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62. * ...
  63. :mod:`django.contrib.sitemaps`
  64. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65. * ...
  66. :mod:`django.contrib.sites`
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. * ...
  69. :mod:`django.contrib.staticfiles`
  70. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71. * ...
  72. :mod:`django.contrib.syndication`
  73. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. * ...
  75. Cache
  76. ~~~~~
  77. * ...
  78. CSRF
  79. ~~~~
  80. * ...
  81. Database backends
  82. ~~~~~~~~~~~~~~~~~
  83. * ...
  84. Email
  85. ~~~~~
  86. * ...
  87. File Storage
  88. ~~~~~~~~~~~~
  89. * ...
  90. File Uploads
  91. ~~~~~~~~~~~~
  92. * ...
  93. Forms
  94. ~~~~~
  95. * ...
  96. Generic Views
  97. ~~~~~~~~~~~~~
  98. * ...
  99. Internationalization
  100. ~~~~~~~~~~~~~~~~~~~~
  101. * ...
  102. Management Commands
  103. ~~~~~~~~~~~~~~~~~~~
  104. * ...
  105. Migrations
  106. ~~~~~~~~~~
  107. * ...
  108. Models
  109. ~~~~~~
  110. * Added support for PostgreSQL operator classes (:attr:`.Index.opclasses`).
  111. * Added many :ref:`math database functions <math-functions>`.
  112. Requests and Responses
  113. ~~~~~~~~~~~~~~~~~~~~~~
  114. * ...
  115. Serialization
  116. ~~~~~~~~~~~~~
  117. * ...
  118. Signals
  119. ~~~~~~~
  120. * ...
  121. Templates
  122. ~~~~~~~~~
  123. * ...
  124. Tests
  125. ~~~~~
  126. * The new :meth:`.SimpleTestCase.assertURLEqual` assertion checks for a given
  127. URL, ignoring the ordering of the query string.
  128. :meth:`~.SimpleTestCase.assertRedirects` uses the new assertion.
  129. URLs
  130. ~~~~
  131. * ...
  132. Validators
  133. ~~~~~~~~~~
  134. * ...
  135. .. _backwards-incompatible-2.2:
  136. Backwards incompatible changes in 2.2
  137. =====================================
  138. Database backend API
  139. --------------------
  140. * Third-party database backends must implement support for table check
  141. constraints or set ``DatabaseFeatures.supports_table_check_constraints`` to
  142. ``False``.
  143. :mod:`django.contrib.gis`
  144. -------------------------
  145. * Support for GDAL 1.9 and 1.10 is dropped.
  146. Miscellaneous
  147. -------------
  148. * On SQLite, ``PositiveIntegerField`` and ``PositiveSmallIntegerField`` now
  149. include a check constraint to prevent negative values in the database. If you
  150. have existing invalid data and run a migration that recreates a table, you'll
  151. see ``CHECK constraint failed``.
  152. * For consistency with WSGI servers, the test client now sets the
  153. ``Content-Length`` header to a string rather than an integer.
  154. .. _deprecated-features-2.2:
  155. Features deprecated in 2.2
  156. ==========================
  157. Miscellaneous
  158. -------------
  159. * ``django.utils.timezone.FixedOffset`` is deprecated in favor of
  160. :class:`datetime.timezone`.