Django のリリースプロセス

revision-up-to:11321 (1.1) unfinished

公式リリース

Django のリリース番号は以下のように付与されています:

  • バージョンは A.B または A.B.C という形式でつけられます。
  • A はメジャーバージョン番号で、増えるのは Django に重大な変更が加 えられ、変更が必ずしも以前のバージョンと互換でない場合だけです。従っ て、 Django 6.0 で動いたコードは Django 7.0 では動かなくなるかもしれ ません。
  • B はマイナーバージョン番号で、比較的大きいながらも後方互換性を保っ た変更の際に増えます。 Django 6.4 向けに書かれたコードは Django 6.5 でも動作するでしょう。
  • C はマイクロバージョンで、バグやセキュリティ修正の度に増えます。 マイクロバージョンは以前のマイクロバージョンと 100% 後方互換性を保ち ます。
  • 場合によってはリリース候補 (release candidate) を作成します。リリース 候補のバージョン番号は A.BrcN の形式で、 A.BN 番目の リリース候補であることを表します。

以上のバージョン番号スキームの例外として、1.0 以前の Django のコード があります。 1.0 リリース以前のコードでは、後方互換性を全く保証していません。

Subversion 上では、 Django の各リリースは tags/releases_ でタグづけされて います。trunk 由来ではないバグフィクスリリースやセキュリティ修正リリースを 出す必要画ある場合、該当リリースは branches/releases にコピーされ、 バグフィクスリリースになります。

Major releases

Major releases (1.0, 2.0, etc.) will happen very infrequently (think “years”, not “months”), and will probably represent major, sweeping changes to Django.

Minor releases

Minor release (1.1, 1.2, etc.) will happen roughly every six months – see release process, below for details.

These releases will contain new features, improvements to existing features, and such. マイナーリリースでは、新しい機能や既存の機能の改善などが行われます。また、 マイナーリリースでは、以前のリリースの特定の機能を撤廃することがあります。 バージョン A.B の機能が撤廃された場合、撤廃された機能は A.B+1 では 動作します。 A.B+2 では PendingDeprecationWarning 警告を送出します が動作します。 A.B+3 では完全に機能を削除します。

So, for example, if we decided to remove a function that existed in Django 1.0:

  • Django 1.1 will contain a backwards-compatible replica of the function which will raise a PendingDeprecationWarning. This warning is silent by default; you need to explicitly turn on display of these warnings.
  • Django 1.2 will contain the backwards-compatible replica, but the warning will be promoted to a full-fledged DeprecationWarning. This warning is loud by default, and will likely be quite annoying.
  • Django 1.3 will remove the feature outright.

Micro releases

Micro releases (1.0.1, 1.0.2, 1.1.1, etc.) will be issued at least once half-way between minor releases, and probably more often as needed.

These releases will always be 100% compatible with the associated minor release – the answer to “should I upgrade to the latest micro release?” will always be “yes.”

Each minor release of Django will have a “release maintainer” appointed. This person will be responsible for making sure that bug fixes are applied to both trunk and the maintained micro-release branch. This person will also work with the release manager to decide when to release the micro releases.

Supported versions

At any moment in time, Django’s developer team will support a set of releases to varying levels:

  • The current development trunk will get new features and bug fixes requiring major refactoring.
  • All bug fixes applied to the trunk will also be applied to the last minor release, to be released as the next micro release.
  • Security fixes will be applied to the current trunk and the previous two minor releases.

As a concrete example, consider a moment in time halfway between the release of Django 1.3 and 1.4. At this point in time:

  • Features will be added to development trunk, to be released as Django 1.4.
  • Bug fixes will be applied to a 1.3.X branch, and released as 1.3.1, 1.3.2, etc.
  • Security releases will be applied to trunk, a 1.3.X branch and a 1.2.X branch. Security fixes will trigger the release of 1.3.1, 1.2.1, etc.

Release process

Django uses a time-based release schedule, with minor (i.e. 1.1, 1.2, etc.) releases every six months, or more, depending on features.

After each previous release (and after a suitable cooling-off period of a week or two), the core development team will examine the landscape and announce a timeline for the next release. Most releases will be scheduled in the 6-9 month range, but if we have bigger features to development we might schedule a longer period to allow for more ambitious work.

Release cycle

Each release cycle will be split into three periods, each lasting roughly one-third of the cycle:

Phase one: feature proposal

The first phase of the release process will be devoted to figuring out what features to include in the next version. This should include a good deal of preliminary work on those features – working code trumps grand design.

At the end of part one, the core developers will propose a feature list for the upcoming release. This will be broken into:

  • “Must-have”: critical features that will delay the release if not finished
  • “Maybe” features: that will be pushed to the next release if not finished
  • “Not going to happen”: features explicitly deferred to a later release.

Anything that hasn’t got at least some work done by the end of the first third isn’t eligible for the next release; a design alone isn’t sufficient.

Phase two: development

The second third of the release schedule is the “heads-down” working period. Using the roadmap produced at the end of phase one, we’ll all work very hard to get everything on it done.

Longer release schedules will likely spend more than a third of the time in this phase.

At the end of phase two, any unfinished “maybe” features will be postponed until the next release. Though it shouldn’t happen, any “must-have” features will extend phase two, and thus postpone the final release.

Phase two will culminate with an alpha release.

Phase three: bugfixes

The last third of a release is spent fixing bugs – no new features will be accepted during this time. We’ll release a beta release about halfway through, and an rc complete with string freeze two weeks before the end of the schedule.

Bug-fix releases

After a minor release (i.e 1.1), the previous release will go into bug-fix mode.

A branch will be created of the form branches/releases/1.0.X to track bug-fixes to the previous release. When possible, bugs fixed on trunk must also be fixed on the bug-fix branch; this means that commits need to cleanly separate bug fixes from feature additions. The developer who commits a fix to trunk will be responsible for also applying the fix to the current bug-fix branch. Each bug-fix branch will have a maintainer who will work with the committers to keep them honest on backporting bug fixes.

How this all fits together

Let’s look at a hypothetical example for how this all first together. Imagine, if you will, a point about halfway between 1.1 and 1.2. At this point, development will be happening in a bunch of places:

  • On trunk, development towards 1.2 proceeds with small additions, bugs fixes, etc. being checked in daily.
  • On the branch “branches/releases/1.1.X”, bug fixes found in the 1.1 release are checked in as needed. At some point, this branch will be released as “1.1.1”, “1.1.2”, etc.
  • On the branch “branches/releases/1.0.X”, security fixes are made if needed and released as “1.0.2”, “1.0.3”, etc.
  • On feature branches, development of major features is done. These branches will be merged into trunk before the end of phase two.