2
0

api-stability.txt 3.0 KB

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