2
0

api-stability.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. =============
  2. API stability
  3. =============
  4. Django promises API stability and forwards-compatibility since version 1.0. In
  5. a nutshell, this means that code you develop against a version of Django will
  6. continue to work with future releases. You may need to make minor changes when
  7. upgrading the version of Django your project uses: see the "Backwards
  8. incompatible changes" section of the :doc:`release note </releases/index>` for
  9. the version or versions to which you are upgrading.
  10. What "stable" means
  11. ===================
  12. In this context, stable means:
  13. - All the public APIs (everything in this documentation) will not be moved
  14. or renamed without providing backwards-compatible aliases.
  15. - If new features are added to these APIs -- which is quite possible --
  16. they will not break or change the meaning of existing methods. In other
  17. words, "stable" does not (necessarily) mean "complete."
  18. - If, for some reason, an API declared stable must be removed or replaced, it
  19. will be declared deprecated but will remain in the API for at least two
  20. feature releases. Warnings will be issued when the deprecated method is
  21. called.
  22. See :ref:`official-releases` for more details on how Django's version
  23. numbering scheme works, and how features will be deprecated.
  24. - We'll only break backwards compatibility of these APIs if a bug or
  25. security hole makes it completely unavoidable.
  26. Stable APIs
  27. ===========
  28. In general, everything covered in the documentation -- with the exception of
  29. anything in the :doc:`internals area </internals/index>` is considered stable.
  30. Exceptions
  31. ==========
  32. There are a few exceptions to this stability and backwards-compatibility
  33. promise.
  34. Security fixes
  35. --------------
  36. If we become aware of a security problem -- hopefully by someone following our
  37. :ref:`security reporting policy <reporting-security-issues>` -- we'll do
  38. everything necessary to fix it. This might mean breaking backwards
  39. compatibility; security trumps the compatibility guarantee.
  40. APIs marked as internal
  41. -----------------------
  42. Certain APIs are explicitly marked as "internal" in a couple of ways:
  43. - Some documentation refers to internals and mentions them as such. If the
  44. documentation says that something is internal, we reserve the right to
  45. change it.
  46. - Functions, methods, and other objects prefixed by a leading underscore
  47. (``_``). This is the standard Python way of indicating that something is
  48. private; if any method starts with a single ``_``, it's an internal API.