api-stability.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. API stability
  2. =============
  3. From its first release, ``cryptography`` will have a strong API stability
  4. policy.
  5. What does this policy cover?
  6. ----------------------------
  7. This policy includes any API or behavior that is documented in this
  8. documentation.
  9. What does "stable" mean?
  10. ------------------------
  11. * Public APIs will not be removed or renamed without providing a compatibility
  12. alias.
  13. * The behavior of existing APIs will not change.
  14. What doesn't this policy cover?
  15. -------------------------------
  16. * We may add new features, things like the result of ``dir(obj))`` or the
  17. contents of ``obj.__dict__`` may change.
  18. * Objects are not guaranteed to be pickleable, and pickled objects from one
  19. version of ``cryptography`` may not be loadable in future versions.
  20. * Development versions of ``cryptography``. Before a feature is in a release,
  21. it is not covered by this policy and may change.
  22. Security
  23. ~~~~~~~~
  24. One exception to our API stability policy is for security. We will violate this
  25. policy as necessary in order to resolve a security issue or harden
  26. ``cryptography`` against a possible attack.
  27. Versioning
  28. ----------
  29. This project uses a custom versioning scheme as described below.
  30. Given a version ``cryptography X.Y.Z``,
  31. * ``X.Y`` is a decimal number that is incremented for
  32. potentially-backwards-incompatible releases.
  33. * This increases like a standard decimal.
  34. In other words, 0.9 is the ninth release, and 1.0 is the tenth (not 0.10).
  35. The dividing decimal point can effectively be ignored.
  36. * ``Z`` is an integer that is incremented for backward-compatible releases.
  37. Deprecation
  38. ~~~~~~~~~~~
  39. From time to time we will want to change the behavior of an API or remove it
  40. entirely. In that case, here's how the process will work:
  41. * In ``cryptography X.Y`` the feature exists.
  42. * In ``cryptography X.Y + 0.1`` using that feature will emit a
  43. ``UserWarning``.
  44. * In ``cryptography X.Y + 0.2`` using that feature will emit a
  45. ``UserWarning``.
  46. * In ``cryptography X.Y + 0.3`` the feature will be removed or changed.
  47. In short, code that runs without warnings will always continue to work for a
  48. period of two releases.
  49. From time to time, we may decide to deprecate an API that is particularly
  50. widely used. In these cases, we may decide to provide an extended deprecation
  51. period, at our discretion.