Alex Stapleton | c5fffd3 | 2014-03-18 15:29:00 +0000 | [diff] [blame] | 1 | Doing a release |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 2 | =============== |
| 3 | |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 4 | Doing a release of ``cryptography`` requires a few steps. |
| 5 | |
Alex Gaynor | 00c0b23 | 2018-08-30 12:47:16 -0400 | [diff] [blame] | 6 | Security Releases |
| 7 | ----------------- |
| 8 | |
| 9 | In addition to the other steps described below, for a release which fixes a |
| 10 | security vulnerability, you should also include the following steps: |
| 11 | |
| 12 | * Request a `CVE from MITRE`_. Once you have received the CVE, it should be |
| 13 | included in the :doc:`changelog`. Ideally you should request the CVE before |
| 14 | starting the release process so that the CVE is available at the time of the |
| 15 | release. |
| 16 | * Ensure that the :doc:`changelog` entry credits whoever reported the issue. |
| 17 | * The release should be announced on the `oss-security`_ mailing list, in |
| 18 | addition to the regular announcement lists. |
| 19 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 20 | Verifying OpenSSL version |
| 21 | ------------------------- |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 22 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 23 | The release process creates wheels bundling OpenSSL for Windows, macOS, and |
| 24 | Linux. Check that the Windows and macOS Jenkins builders have the latest |
| 25 | version of OpenSSL installed and verify that the latest version is present in |
| 26 | the ``pyca/cryptography-manylinux1`` docker containers. If anything is out |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 27 | of date follow the instructions for upgrading OpenSSL. |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 28 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 29 | Upgrading OpenSSL |
| 30 | ----------------- |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 31 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 32 | Use the `upgrading OpenSSL issue template`_. |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 33 | |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 34 | Bumping the version number |
| 35 | -------------------------- |
| 36 | |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 37 | The next step in doing a release is bumping the version number in the |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 38 | software. |
| 39 | |
Alex Gaynor | 0064bfa | 2015-03-09 07:10:40 -0400 | [diff] [blame] | 40 | * Update the version number in ``src/cryptography/__about__.py``. |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 41 | * Update the version number in ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 3f23040 | 2014-01-08 09:21:57 -0800 | [diff] [blame] | 42 | * Set the release date in the :doc:`/changelog`. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 43 | * Do a commit indicating this. |
| 44 | * Send a pull request with this. |
| 45 | * Wait for it to be merged. |
| 46 | |
| 47 | Performing the release |
| 48 | ---------------------- |
| 49 | |
Alex Stapleton | 63b3de2 | 2014-02-08 09:43:16 +0000 | [diff] [blame] | 50 | The commit that merged the version number bump is now the official release |
Alex Gaynor | b3794db | 2014-01-07 09:25:54 -0800 | [diff] [blame] | 51 | commit for this release. You will need to have ``gpg`` installed and a ``gpg`` |
| 52 | key in order to do a release. Once this has happened: |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 53 | |
Alex Gaynor | c7dd9de | 2017-05-20 14:37:40 -0700 | [diff] [blame] | 54 | * Run ``python release.py {version}``. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 55 | |
Alex Gaynor | fea893c | 2014-01-07 11:06:51 -0800 | [diff] [blame] | 56 | The release should now be available on PyPI and a tag should be available in |
Paul Kehrer | 1f1e02f | 2014-07-06 08:52:17 -0500 | [diff] [blame] | 57 | the repository. |
| 58 | |
| 59 | Verifying the release |
| 60 | --------------------- |
| 61 | |
| 62 | You should verify that ``pip install cryptography`` works correctly: |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 63 | |
| 64 | .. code-block:: pycon |
| 65 | |
| 66 | >>> import cryptography |
| 67 | >>> cryptography.__version__ |
| 68 | '...' |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 69 | >>> import cryptography_vectors |
| 70 | >>> cryptography_vectors.__version__ |
| 71 | '...' |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 72 | |
| 73 | Verify that this is the version you just released. |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 74 | |
Paul Kehrer | 1f1e02f | 2014-07-06 08:52:17 -0500 | [diff] [blame] | 75 | For the Windows wheels check the builds for the ``cryptography-wheel-builder`` |
| 76 | job and verify that the final output for each build shows it loaded and linked |
| 77 | the expected OpenSSL version. |
| 78 | |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 79 | Post-release tasks |
| 80 | ------------------ |
| 81 | |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 82 | * Update the version number to the next major (e.g. ``0.5.dev1``) in |
Alex Gaynor | d7e73c2 | 2017-07-17 14:59:29 -0400 | [diff] [blame] | 83 | ``src/cryptography/__about__.py`` and |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 84 | ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 5563ea0 | 2016-06-04 12:57:17 -0700 | [diff] [blame] | 85 | * Close the `milestone`_ for the previous release on GitHub. |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 86 | * Add new :doc:`/changelog` entry with next version and note that it is under |
| 87 | active development |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 88 | * Send a pull request with these items |
Paul Kehrer | 3254741 | 2014-04-02 21:31:41 -0500 | [diff] [blame] | 89 | * Check for any outstanding code undergoing a deprecation cycle by looking in |
| 90 | ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open |
| 91 | a ticket to increment them for the next release. |
Alex Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 92 | * Send an email to the `mailing list`_ and `python-announce`_ announcing the |
| 93 | release. |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 94 | |
Alex Gaynor | 00c0b23 | 2018-08-30 12:47:16 -0400 | [diff] [blame] | 95 | .. _`CVE from MITRE`: https://cveform.mitre.org/ |
| 96 | .. _`oss-security`: http://www.openwall.com/lists/oss-security/ |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 97 | .. _`upgrading OpenSSL issue template`: https://github.com/pyca/cryptography/issues/new?template=openssl-release.md |
Alex Gaynor | 5563ea0 | 2016-06-04 12:57:17 -0700 | [diff] [blame] | 98 | .. _`milestone`: https://github.com/pyca/cryptography/milestones |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 99 | .. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev |
Alex Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 100 | .. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list |