Начиная с версии 1.0, версии Django нумеруются следующим образом:
Номер версии выглядит как A.B или A.B.C.
В git каждый релиз Django имеет свой тег, определяющий его номер, подписанный ключом. Также в репозитории каждый релиз находится в отдельной ветке под названием stable/A.B.x, а багфиксы выпускаются на основании уже этой ветки.
Подробнее о том, как подготавливаются релизы безопасности можно прочитать в our security policies.
Patch releases (A.B.C, A.B.C+1, etc.) will be issued as needed, to fix bugs and/or security issues.
These releases will be 100% compatible with the associated feature release, unless this is impossible for security reasons or to prevent data loss. So the answer to “should I upgrade to the latest patch release?” will always be “yes.”
Certain feature releases will be designated as long-term support (LTS) releases. These releases will get security and data loss fixes applied for a guaranteed period of time, typically three years.
See the download page for the releases that have been designated for long-term support.
Starting with Django 2.0, version numbers will use a loose form of semantic versioning such that each version following an LTS will bump to the next “dot zero” version. For example: 2.0, 2.1, 2.2 (LTS), 3.0, 3.1, 3.2 (LTS), etc.
SemVer makes it easier to see at a glance how compatible releases are with each other. It also helps to anticipate when compatibility shims will be removed. It’s not a pure form of SemVer as each feature release will continue to have a few documented backwards incompatibilities where a deprecation path isn’t possible or not worth the cost. Also, deprecations started in an LTS release (X.2) will be dropped in a non-dot-zero release (Y.1) to accommodate our policy of keeping deprecation shims for at least two feature releases. Read on to the next section for an example.
A feature release may deprecate certain features from previous releases. If a feature is deprecated in feature release A.x, it will continue to work in all A.x versions (for all versions of x) but raise warnings. Deprecated features will be removed in the B.0 release, or B.1 for features deprecated in the last A.x feature release to ensure deprecations are done over at least 2 feature releases.
So, for example, if we decided to start the deprecation of a function in Django 4.2:
A more generic example:
At any moment in time, Django’s developer team will support a set of releases to varying levels. See the supported versions section of the download page for the current state of support for each version.
The current development master will get new features and bug fixes requiring non-trivial refactoring.
Patches applied to the master branch must also be applied to the last feature release branch, to be released in the next patch release of that feature series, when they fix critical problems:
Вопросы безопасности.
Падения приложения.
Опасные ошибки в новой функциональности.
The rule of thumb is that fixes will be backported to the last feature release for bugs that would have prevented a release in the first place (release blockers).
Security fixes and data loss bugs will be applied to the current master, the last two feature release branches, and any other supported long-term support release branches.
Исправления документации очень часто переносятся в ветку последнего релиза. Происходит это потому что выгодно иметь свежую и правильную документацию последнего выпуска, а риск проявления регрессии ничтожно мал.
As a concrete example, consider a moment in time halfway between the release of Django 5.1 and 5.2. At this point in time:
Django uses a time-based release schedule, with feature releases every eight months or so.
After each feature release, the release manager will announce a timeline for the next feature release.
Each release cycle consists of three parts:
The first phase of the release process will include figuring out what major features to include in the next version. This should include a good deal of preliminary work on those features – working code trumps grand design.
Major features for an upcoming release will be added to the wiki roadmap page, e.g. https://code.djangoproject.com/wiki/Version1.9Roadmap.
The second part 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.
At the end of phase two, any unfinished features will be postponed until the next release.
Результатом разработки становится создание ветки stable/A.B.x, которая отделяется от master.
The last part of a release cycle is spent fixing bugs – no new features will be accepted during this time. We’ll try to release a beta release one month after the alpha and a release candidate one month after the beta.
Выпуск RC замораживает строковые константы, это случается как минимум за 2 недели до выпуска релиза. После этого новые переводы строк не принимаются.
В течении этой фазы разработчики становятся всё более консервативными в применении патчей, чтобы избежать регрессии. После выпуска RC принимаются только исправления блокирующих ошибок и документации.
В это же время в ветке master может начать появляться новая функциональность, которая будет рассмотрена в цикле релиза A.B+1.
After a feature release (e.g. A.B), the previous release will go into bugfix mode.
The branch for the previous feature release (e.g. stable/A.B-1.x) will include bugfixes. Critical bugs fixed on master must also be fixed on the bugfix branch; this means that commits need to cleanly separate bug fixes from feature additions. The developer who commits a fix to master will be responsible for also applying the fix to the current bugfix branch.
Mar 31, 2016