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