{"title":"API stability","version":"2.2","locale":"en","docname":"misc/api-stability","url":"/en/2.2/misc/api-stability/","canonical":"https://djangodocs.dev/en/2.2/misc/api-stability/","summary":"Django is committed to API stability and forwards-compatibility. In a nutshell, this means that code you develop against a version of Django will continue to work…","html":"<h1>API stability<a class=\"heading-anchor\" href=\"#api-stability\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Django is committed to API stability and forwards-compatibility. In a nutshell,\nthis means that code you develop against a version of Django will continue to\nwork with future releases. You may need to make minor changes when upgrading\nthe version of Django your project uses: see the “Backwards incompatible\nchanges” section of the <a class=\"reference internal\" href=\"/en/2.2/releases/\"><span class=\"doc\">release note</span></a> for the version\nor versions to which you are upgrading.</p>\n<p>At the same time as making API stability a very high priority, Django is also\ncommitted to continual improvement, along with aiming for “one way to do it”\n(eventually) in the APIs we provide. This means that when we discover clearly\nsuperior ways to do things, we will deprecate and eventually remove the old\nways. Our aim is to provide a modern, dependable web framework of the highest\nquality that encourages best practices in all projects that use it. By using\nincremental improvements, we try to avoid both stagnation and large breaking\nupgrades.</p>\n<section id=\"what-stable-means\">\n<h2>What “stable” means<a class=\"heading-anchor\" href=\"#what-stable-means\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>In this context, stable means:</p>\n<ul>\n<li><p>All the public APIs (everything in this documentation) will not be moved\nor renamed without providing backwards-compatible aliases.</p></li>\n<li><p>If new features are added to these APIs – which is quite possible –\nthey will not break or change the meaning of existing methods. In other\nwords, “stable” does not (necessarily) mean “complete.”</p></li>\n<li><p>If, for some reason, an API declared stable must be removed or replaced, it\nwill be declared deprecated but will remain in the API for at least two\nfeature releases. Warnings will be issued when the deprecated method is\ncalled.</p>\n<p>See <a class=\"reference internal\" href=\"/en/2.2/internals/release-process/#official-releases\"><span class=\"std std-ref\">Official releases</span></a> for more details on how Django’s version\nnumbering scheme works, and how features will be deprecated.</p>\n</li>\n<li><p>We’ll only break backwards compatibility of these APIs without a deprecation\nprocess if a bug or security hole makes it completely unavoidable.</p></li>\n</ul>\n</section>\n<section id=\"stable-apis\">\n<h2>Stable APIs<a class=\"heading-anchor\" href=\"#stable-apis\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>In general, everything covered in the documentation – with the exception of\nanything in the <a class=\"reference internal\" href=\"/en/2.2/internals/\"><span class=\"doc\">internals area</span></a> is considered stable.</p>\n</section>\n<section id=\"exceptions\">\n<h2>Exceptions<a class=\"heading-anchor\" href=\"#exceptions\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>There are a few exceptions to this stability and backwards-compatibility\npromise.</p>\n<section id=\"security-fixes\">\n<h3>Security fixes<a class=\"heading-anchor\" href=\"#security-fixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If we become aware of a security problem – hopefully by someone following our\n<a class=\"reference internal\" href=\"/en/2.2/internals/security/#reporting-security-issues\"><span class=\"std std-ref\">security reporting policy</span></a> – we’ll do\neverything necessary to fix it. This might mean breaking backwards\ncompatibility; security trumps the compatibility guarantee.</p>\n</section>\n<section id=\"apis-marked-as-internal\">\n<h3>APIs marked as internal<a class=\"heading-anchor\" href=\"#apis-marked-as-internal\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Certain APIs are explicitly marked as “internal” in a couple of ways:</p>\n<ul class=\"simple\">\n<li><p>Some documentation refers to internals and mentions them as such. If the\ndocumentation says that something is internal, we reserve the right to\nchange it.</p></li>\n<li><p>Functions, methods, and other objects prefixed by a leading underscore\n(<code class=\"docutils literal notranslate\"><span class=\"pre\">_</span></code>). This is the standard Python way of indicating that something is\nprivate; if any method starts with a single <code class=\"docutils literal notranslate\"><span class=\"pre\">_</span></code>, it’s an internal API.</p></li>\n</ul>\n</section>\n</section>","rootId":"api-stability","toc":[{"title":"What “stable” means","anchor":"what-stable-means","children":[]},{"title":"Stable APIs","anchor":"stable-apis","children":[]},{"title":"Exceptions","anchor":"exceptions","children":[{"title":"Security fixes","anchor":"security-fixes","children":[]},{"title":"APIs marked as internal","anchor":"apis-marked-as-internal","children":[]}]}],"breadcrumbs":[{"docname":"misc/index","title":"Meta-documentation and miscellany","url":"/en/2.2/misc/"}],"prev":{"docname":"misc/index","title":"Meta-documentation and miscellany","url":"/en/2.2/misc/"},"next":{"docname":"misc/design-philosophies","title":"Design philosophies","url":"/en/2.2/misc/design-philosophies/"},"formats":{"html":"/en/2.2/misc/api-stability/","markdown":"/en/2.2/misc/api-stability.md","json":"/en/2.2/misc/api-stability.json"},"source":"https://github.com/django/django/blob/stable/2.2.x/docs/misc/api-stability.txt","official":"https://docs.djangoproject.com/en/2.2/misc/api-stability/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11","1.10","1.9","1.8"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}