2
0

release-process.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. ========================
  2. Django's release process
  3. ========================
  4. .. _official-releases:
  5. Official releases
  6. =================
  7. Since version 1.0, Django's release numbering works as follows:
  8. * Versions are numbered in the form ``A.B`` or ``A.B.C``.
  9. * ``A.B`` is the *feature release* version number. Each version will be mostly
  10. backwards compatible with the previous release. Exceptions to this rule will
  11. be listed in the release notes.
  12. * ``C`` is the *patch release* version number, which is incremented for bugfix
  13. and security releases. These releases will be 100% backwards-compatible with
  14. the previous patch release. The only exception is when a security or data
  15. loss issue can't be fixed without breaking backwards-compatibility. If this
  16. happens, the release notes will provide detailed upgrade instructions.
  17. * Before a new feature release, we'll make alpha, beta, and release candidate
  18. releases. These are of the form ``A.B alpha/beta/rc N``, which means the
  19. ``Nth`` alpha/beta/release candidate of version ``A.B``.
  20. In git, each Django release will have a tag indicating its version number,
  21. signed with the Django release key. Additionally, each release series has its
  22. own branch, called ``stable/A.B.x``, and bugfix/security releases will be
  23. issued from those branches.
  24. For more information about how the Django project issues new releases for
  25. security purposes, please see :doc:`our security policies <security>`.
  26. .. glossary::
  27. Feature release
  28. Feature releases (A.B, A.B+1, etc.) will happen roughly every eight months
  29. -- see `release process`_ for details. These releases will contain new
  30. features, improvements to existing features, and such.
  31. Patch release
  32. Patch releases (A.B.C, A.B.C+1, etc.) will be issued as needed, to fix
  33. bugs and/or security issues.
  34. These releases will be 100% compatible with the associated feature release,
  35. unless this is impossible for security reasons or to prevent data loss.
  36. So the answer to "should I upgrade to the latest patch release?" will always
  37. be "yes."
  38. Long-term support release
  39. Certain feature releases will be designated as long-term support (LTS)
  40. releases. These releases will get security and data loss fixes applied for
  41. a guaranteed period of time, typically three years.
  42. See `the download page`_ for the releases that have been designated for
  43. long-term support.
  44. .. _the download page: https://www.djangoproject.com/download/
  45. .. _internal-release-cadence:
  46. Release cadence
  47. ===============
  48. Starting with Django 2.0, version numbers will use a loose form of `semantic
  49. versioning <https://semver.org/>`_ such that each version following an LTS will
  50. bump to the next "dot zero" version. For example: 2.0, 2.1, 2.2 (LTS), 3.0,
  51. 3.1, 3.2 (LTS), etc.
  52. SemVer makes it easier to see at a glance how compatible releases are with each
  53. other. It also helps to anticipate when compatibility shims will be removed.
  54. It's not a pure form of SemVer as each feature release will continue to have a
  55. few documented backwards incompatibilities where a deprecation path isn't
  56. possible or not worth the cost. Also, deprecations started in an LTS release
  57. (X.2) will be dropped in a non-dot-zero release (Y.1) to accommodate our policy
  58. of keeping deprecation shims for at least two feature releases. Read on to the
  59. next section for an example.
  60. .. _internal-release-deprecation-policy:
  61. Deprecation policy
  62. ==================
  63. A feature release may deprecate certain features from previous releases. If a
  64. feature is deprecated in feature release A.x, it will continue to work in all
  65. A.x versions (for all versions of x) but raise warnings. Deprecated features
  66. will be removed in the B.0 release, or B.1 for features deprecated in the last
  67. A.x feature release to ensure deprecations are done over at least 2 feature
  68. releases.
  69. So, for example, if we decided to start the deprecation of a function in
  70. Django 4.2:
  71. * Django 4.2 will contain a backwards-compatible replica of the function which
  72. will raise a ``RemovedInDjango51Warning``.
  73. * Django 5.0 (the version that follows 4.2) will still contain the
  74. backwards-compatible replica.
  75. * Django 5.1 will remove the feature outright.
  76. The warnings are silent by default. You can turn on display of these warnings
  77. with the ``python -Wd`` option.
  78. A more generic example:
  79. * X.0
  80. * X.1
  81. * X.2 LTS
  82. * Y.0: Drop deprecation shims added in X.0 and X.1.
  83. * Y.1: Drop deprecation shims added in X.2.
  84. * Y.2 LTS: No deprecation shims dropped (while Y.0 is no longer supported,
  85. third-party apps need to maintain compatibility back to X.2 LTS to ease
  86. LTS to LTS upgrades).
  87. * Z.0: Drop deprecation shims added in Y.0 and Y.1.
  88. See also the :ref:`deprecating-a-feature` guide.
  89. .. _supported-versions-policy:
  90. Supported versions
  91. ==================
  92. At any moment in time, Django's developer team will support a set of releases to
  93. varying levels. See `the supported versions section
  94. <https://www.djangoproject.com/download/#supported-versions>`_ of the download
  95. page for the current state of support for each version.
  96. * The current development branch ``main`` will get new features and bug fixes
  97. requiring non-trivial refactoring.
  98. * Patches applied to the main branch must also be applied to the last feature
  99. release branch, to be released in the next patch release of that feature
  100. series, when they fix critical problems:
  101. * Security issues.
  102. * Data loss bugs.
  103. * Crashing bugs.
  104. * Major functionality bugs in new features of the latest stable release.
  105. * Regressions from older versions of Django introduced in the current release
  106. series.
  107. The rule of thumb is that fixes will be backported to the last feature
  108. release for bugs that would have prevented a release in the first place
  109. (release blockers).
  110. * Security fixes and data loss bugs will be applied to the current main branch,
  111. the last two feature release branches, and any other supported long-term
  112. support release branches.
  113. * Documentation fixes generally will be more freely backported to the last
  114. release branch. That's because it's highly advantageous to have the docs for
  115. the last release be up-to-date and correct, and the risk of introducing
  116. regressions is much less of a concern.
  117. As a concrete example, consider a moment in time halfway between the release of
  118. Django 5.1 and 5.2. At this point in time:
  119. * Features will be added to the development main branch, to be released as
  120. Django 5.2.
  121. * Critical bug fixes will be applied to the ``stable/5.1.x`` branch, and
  122. released as 5.1.1, 5.1.2, etc.
  123. * Security fixes and bug fixes for data loss issues will be applied to
  124. ``main`` and to the ``stable/5.1.x``, ``stable/5.0.x``, and
  125. ``stable/4.2.x`` (LTS) branches. They will trigger the release of ``5.1.1``,
  126. ``5.0.5``, ``4.2.8``, etc.
  127. * Documentation fixes will be applied to main, and, if easily backported, to
  128. the latest stable branch, ``5.1.x``.
  129. .. _release-process:
  130. Release process
  131. ===============
  132. Django uses a time-based release schedule, with feature releases every eight
  133. months or so.
  134. After each feature release, the release manager will announce a timeline for
  135. the next feature release.
  136. Release cycle
  137. -------------
  138. Each release cycle consists of three parts:
  139. Phase one: feature proposal
  140. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  141. The first phase of the release process will include figuring out what major
  142. features to include in the next version. This should include a good deal of
  143. preliminary work on those features -- working code trumps grand design.
  144. Major features for an upcoming release will be added to the wiki roadmap page,
  145. e.g. https://code.djangoproject.com/wiki/Version1.11Roadmap.
  146. Phase two: development
  147. ~~~~~~~~~~~~~~~~~~~~~~
  148. The second part of the release schedule is the "heads-down" working period.
  149. Using the roadmap produced at the end of phase one, we'll all work very hard to
  150. get everything on it done.
  151. At the end of phase two, any unfinished features will be postponed until the
  152. next release.
  153. Phase two will culminate with an alpha release. At this point, the
  154. ``stable/A.B.x`` branch will be forked from ``main``.
  155. Phase three: bugfixes
  156. ~~~~~~~~~~~~~~~~~~~~~
  157. The last part of a release cycle is spent fixing bugs -- no new features will
  158. be accepted during this time. We'll try to release a beta release one month
  159. after the alpha and a release candidate one month after the beta.
  160. The release candidate marks the string freeze, and it happens at least two
  161. weeks before the final release. After this point, new translatable strings
  162. must not be added.
  163. During this phase, mergers will be more and more conservative with backports,
  164. to avoid introducing regressions. After the release candidate, only release
  165. blockers and documentation fixes should be backported.
  166. In parallel to this phase, ``main`` can receive new features, to be released
  167. in the ``A.B+1`` cycle.
  168. Bug-fix releases
  169. ----------------
  170. After a feature release (e.g. A.B), the previous release will go into bugfix
  171. mode.
  172. The branch for the previous feature release (e.g. ``stable/A.B-1.x``) will
  173. include bugfixes. Critical bugs fixed on main must *also* be fixed on the
  174. bugfix branch; this means that commits need to cleanly separate bug fixes from
  175. feature additions. The developer who commits a fix to main will be
  176. responsible for also applying the fix to the current bugfix branch.