release-process.txt 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. Release cadence
  46. ===============
  47. Starting with Django 2.0, version numbers will use a loose form of `semantic
  48. versioning <http://semver.org/>`_ such that each version following an LTS will
  49. bump to the next "dot zero" version. For example: 2.0, 2.1, 2.2 (LTS), 3.0,
  50. 3.1, 3.2 (LTS), etc.
  51. SemVer makes it easier to see at a glance how compatible releases are with each
  52. other. It also helps to anticipate when compatibility shims will be removed.
  53. It's not a pure form of SemVer as each feature release will continue to have a
  54. few documented backwards incompatibilities where a deprecation path isn't
  55. possible or not worth the cost. Also, deprecations started in an LTS release
  56. (X.2) will be dropped in a non-dot-zero release (Y.1) to accommodate our policy
  57. of keeping deprecation shims for at least two feature releases. Read on to the
  58. next section for an example.
  59. .. _internal-release-deprecation-policy:
  60. Deprecation policy
  61. ==================
  62. A feature release may deprecate certain features from previous releases. If a
  63. feature is deprecated in feature release A.x, it will continue to work in all
  64. A.x versions (for all versions of x) but raise warnings. Deprecated features
  65. will be removed in the B.0 release, or B.1 for features deprecated in the last
  66. A.x feature release to ensure deprecations are done over at least 2 feature
  67. releases.
  68. So, for example, if we decided to start the deprecation of a function in
  69. Django 4.2:
  70. * Django 4.2 will contain a backwards-compatible replica of the function which
  71. will raise a ``RemovedInDjango51Warning``. This warning is silent by
  72. default; you can turn on display of these warnings with the ``-Wd`` option
  73. of Python.
  74. * Django 5.0 (the version that follows 4.2) will still contain the
  75. backwards-compatible replica. This warning becomes *loud* by default and
  76. will likely be quite annoying.
  77. * Django 5.1 will remove the feature outright.
  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. .. _backwards-compatibility-policy:
  89. Supported versions
  90. ==================
  91. At any moment in time, Django's developer team will support a set of releases to
  92. varying levels. See `the supported versions section
  93. <https://www.djangoproject.com/download/#supported-versions>`_ of the download
  94. page for the current state of support for each version.
  95. * The current development master will get new features and bug fixes
  96. requiring non-trivial refactoring.
  97. * Patches applied to the master branch must also be applied to the last feature
  98. release branch, to be released in the next patch release of that feature
  99. series, when they fix critical problems:
  100. * Security issues.
  101. * Data loss bugs.
  102. * Crashing bugs.
  103. * Major functionality bugs in newly-introduced features.
  104. The rule of thumb is that fixes will be backported to the last feature
  105. release for bugs that would have prevented a release in the first place
  106. (release blockers).
  107. * Security fixes and data loss bugs will be applied to the current master, the
  108. last two feature release branches, and any other supported long-term
  109. support release branches.
  110. * Documentation fixes generally will be more freely backported to the last
  111. release branch. That's because it's highly advantageous to have the docs for
  112. the last release be up-to-date and correct, and the risk of introducing
  113. regressions is much less of a concern.
  114. As a concrete example, consider a moment in time halfway between the release of
  115. Django 5.1 and 5.2. At this point in time:
  116. * Features will be added to development master, to be released as Django 5.2.
  117. * Critical bug fixes will be applied to the ``stable/5.1.x`` branch, and
  118. released as 5.1.1, 5.1.2, etc.
  119. * Security fixes and bug fixes for data loss issues will be applied to
  120. ``master`` and to the ``stable/5.1.x``, and ``stable/4.2.x`` (LTS) branches.
  121. They will trigger the release of ``5.1.1``, ``4.2.1``, etc.
  122. * Documentation fixes will be applied to master, and, if easily backported, to
  123. the latest stable branch, ``5.1.x``.
  124. .. _release-process:
  125. Release process
  126. ===============
  127. Django uses a time-based release schedule, with feature releases every eight
  128. months or so.
  129. After each feature release, the release manager will announce a timeline for
  130. the next feature release.
  131. Release cycle
  132. -------------
  133. Each release cycle consists of three parts:
  134. Phase one: feature proposal
  135. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  136. The first phase of the release process will include figuring out what major
  137. features to include in the next version. This should include a good deal of
  138. preliminary work on those features -- working code trumps grand design.
  139. Major features for an upcoming release will be added to the wiki roadmap page,
  140. e.g. https://code.djangoproject.com/wiki/Version1.9Roadmap.
  141. Phase two: development
  142. ~~~~~~~~~~~~~~~~~~~~~~
  143. The second part of the release schedule is the "heads-down" working period.
  144. Using the roadmap produced at the end of phase one, we'll all work very hard to
  145. get everything on it done.
  146. At the end of phase two, any unfinished features will be postponed until the
  147. next release.
  148. Phase two will culminate with an alpha release. At this point, the
  149. ``stable/A.B.x`` branch will be forked from ``master``.
  150. Phase three: bugfixes
  151. ~~~~~~~~~~~~~~~~~~~~~
  152. The last part of a release cycle is spent fixing bugs -- no new features will
  153. be accepted during this time. We'll try to release a beta release one month
  154. after the alpha and a release candidate one month after the beta.
  155. The release candidate marks the string freeze, and it happens at least two
  156. weeks before the final release. After this point, new translatable strings
  157. must not be added.
  158. During this phase, committers will be more and more conservative with
  159. backports, to avoid introducing regressions. After the release candidate, only
  160. release blockers and documentation fixes should be backported.
  161. In parallel to this phase, ``master`` can receive new features, to be released
  162. in the ``A.B+1`` cycle.
  163. Bug-fix releases
  164. ----------------
  165. After a feature release (e.g. A.B), the previous release will go into bugfix
  166. mode.
  167. The branch for the previous feature release (e.g. ``stable/A.B-1.x``) will
  168. include bugfixes. Critical bugs fixed on master must *also* be fixed on the
  169. bugfix branch; this means that commits need to cleanly separate bug fixes from
  170. feature additions. The developer who commits a fix to master will be
  171. responsible for also applying the fix to the current bugfix branch.