release-process.txt 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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``.
  72. * Django 5.0 (the version that follows 4.2) will still contain the
  73. backwards-compatible replica.
  74. * Django 5.1 will remove the feature outright.
  75. The warnings are silent by default. You can turn on display of these warnings
  76. with the ``python -Wd`` option.
  77. A more generic example:
  78. * X.0
  79. * X.1
  80. * X.2 LTS
  81. * Y.0: Drop deprecation shims added in X.0 and X.1.
  82. * Y.1: Drop deprecation shims added in X.2.
  83. * Y.2 LTS: No deprecation shims dropped (while Y.0 is no longer supported,
  84. third-party apps need to maintain compatibility back to X.2 LTS to ease
  85. LTS to LTS upgrades).
  86. * Z.0: Drop deprecation shims added in Y.0 and Y.1.
  87. .. _backwards-compatibility-policy:
  88. Supported versions
  89. ==================
  90. At any moment in time, Django's developer team will support a set of releases to
  91. varying levels. See `the supported versions section
  92. <https://www.djangoproject.com/download/#supported-versions>`_ of the download
  93. page for the current state of support for each version.
  94. * The current development master will get new features and bug fixes
  95. requiring non-trivial refactoring.
  96. * Patches applied to the master branch must also be applied to the last feature
  97. release branch, to be released in the next patch release of that feature
  98. series, when they fix critical problems:
  99. * Security issues.
  100. * Data loss bugs.
  101. * Crashing bugs.
  102. * Major functionality bugs in newly-introduced features.
  103. * Regressions from older versions of Django.
  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``, ``stable/5.0.x``, and
  121. ``stable/4.2.x`` (LTS) branches. They will trigger the release of ``5.1.1``,
  122. ``5.0.5``, ``4.2.8``, etc.
  123. * Documentation fixes will be applied to master, and, if easily backported, to
  124. the latest stable branch, ``5.1.x``.
  125. .. _release-process:
  126. Release process
  127. ===============
  128. Django uses a time-based release schedule, with feature releases every eight
  129. months or so.
  130. After each feature release, the release manager will announce a timeline for
  131. the next feature release.
  132. Release cycle
  133. -------------
  134. Each release cycle consists of three parts:
  135. Phase one: feature proposal
  136. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  137. The first phase of the release process will include figuring out what major
  138. features to include in the next version. This should include a good deal of
  139. preliminary work on those features -- working code trumps grand design.
  140. Major features for an upcoming release will be added to the wiki roadmap page,
  141. e.g. https://code.djangoproject.com/wiki/Version1.11Roadmap.
  142. Phase two: development
  143. ~~~~~~~~~~~~~~~~~~~~~~
  144. The second part of the release schedule is the "heads-down" working period.
  145. Using the roadmap produced at the end of phase one, we'll all work very hard to
  146. get everything on it done.
  147. At the end of phase two, any unfinished features will be postponed until the
  148. next release.
  149. Phase two will culminate with an alpha release. At this point, the
  150. ``stable/A.B.x`` branch will be forked from ``master``.
  151. Phase three: bugfixes
  152. ~~~~~~~~~~~~~~~~~~~~~
  153. The last part of a release cycle is spent fixing bugs -- no new features will
  154. be accepted during this time. We'll try to release a beta release one month
  155. after the alpha and a release candidate one month after the beta.
  156. The release candidate marks the string freeze, and it happens at least two
  157. weeks before the final release. After this point, new translatable strings
  158. must not be added.
  159. During this phase, committers will be more and more conservative with
  160. backports, to avoid introducing regressions. After the release candidate, only
  161. release blockers and documentation fixes should be backported.
  162. In parallel to this phase, ``master`` can receive new features, to be released
  163. in the ``A.B+1`` cycle.
  164. Bug-fix releases
  165. ----------------
  166. After a feature release (e.g. A.B), the previous release will go into bugfix
  167. mode.
  168. The branch for the previous feature release (e.g. ``stable/A.B-1.x``) will
  169. include bugfixes. Critical bugs fixed on master must *also* be fixed on the
  170. bugfix branch; this means that commits need to cleanly separate bug fixes from
  171. feature additions. The developer who commits a fix to master will be
  172. responsible for also applying the fix to the current bugfix branch.