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 | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 6 | Verifying OpenSSL version |
| 7 | ------------------------- |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 8 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 9 | The release process creates wheels bundling OpenSSL for Windows, macOS, and |
| 10 | Linux. Check that the Windows and macOS Jenkins builders have the latest |
| 11 | version of OpenSSL installed and verify that the latest version is present in |
| 12 | the ``pyca/cryptography-manylinux1`` docker containers. If anything is out |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 13 | of date follow the instructions for upgrading OpenSSL. |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 14 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 15 | Upgrading OpenSSL |
| 16 | ----------------- |
Paul Kehrer | b7af2f5 | 2015-09-22 14:50:26 -0500 | [diff] [blame] | 17 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 18 | Use the `upgrading OpenSSL issue template`_. |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 19 | |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 20 | Bumping the version number |
| 21 | -------------------------- |
| 22 | |
Paul Kehrer | 27bb5fe | 2014-07-04 11:28:08 -0500 | [diff] [blame] | 23 | 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] | 24 | software. |
| 25 | |
Alex Gaynor | 0064bfa | 2015-03-09 07:10:40 -0400 | [diff] [blame] | 26 | * Update the version number in ``src/cryptography/__about__.py``. |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 27 | * Update the version number in ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 3f23040 | 2014-01-08 09:21:57 -0800 | [diff] [blame] | 28 | * Set the release date in the :doc:`/changelog`. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 29 | * Do a commit indicating this. |
| 30 | * Send a pull request with this. |
| 31 | * Wait for it to be merged. |
| 32 | |
| 33 | Performing the release |
| 34 | ---------------------- |
| 35 | |
Alex Stapleton | 63b3de2 | 2014-02-08 09:43:16 +0000 | [diff] [blame] | 36 | 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] | 37 | commit for this release. You will need to have ``gpg`` installed and a ``gpg`` |
| 38 | key in order to do a release. Once this has happened: |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 39 | |
Alex Gaynor | c7dd9de | 2017-05-20 14:37:40 -0700 | [diff] [blame] | 40 | * Run ``python release.py {version}``. |
Alex Gaynor | 89063f6 | 2014-01-06 15:52:38 -0800 | [diff] [blame] | 41 | |
Alex Gaynor | fea893c | 2014-01-07 11:06:51 -0800 | [diff] [blame] | 42 | 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] | 43 | the repository. |
| 44 | |
| 45 | Verifying the release |
| 46 | --------------------- |
| 47 | |
| 48 | You should verify that ``pip install cryptography`` works correctly: |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 49 | |
| 50 | .. code-block:: pycon |
| 51 | |
| 52 | >>> import cryptography |
| 53 | >>> cryptography.__version__ |
| 54 | '...' |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 55 | >>> import cryptography_vectors |
| 56 | >>> cryptography_vectors.__version__ |
| 57 | '...' |
Alex Gaynor | 41c14d5 | 2014-01-07 11:19:08 -0800 | [diff] [blame] | 58 | |
| 59 | Verify that this is the version you just released. |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 60 | |
Paul Kehrer | 1f1e02f | 2014-07-06 08:52:17 -0500 | [diff] [blame] | 61 | For the Windows wheels check the builds for the ``cryptography-wheel-builder`` |
| 62 | job and verify that the final output for each build shows it loaded and linked |
| 63 | the expected OpenSSL version. |
| 64 | |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 65 | Post-release tasks |
| 66 | ------------------ |
| 67 | |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 68 | * 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] | 69 | ``src/cryptography/__about__.py`` and |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 70 | ``vectors/cryptography_vectors/__about__.py``. |
Alex Gaynor | 5563ea0 | 2016-06-04 12:57:17 -0700 | [diff] [blame] | 71 | * Close the `milestone`_ for the previous release on GitHub. |
Paul Kehrer | 3bcd3e0 | 2014-04-02 21:00:35 -0500 | [diff] [blame] | 72 | * Add new :doc:`/changelog` entry with next version and note that it is under |
| 73 | active development |
Paul Kehrer | ff26c74 | 2014-04-02 19:11:53 -0500 | [diff] [blame] | 74 | * Send a pull request with these items |
Paul Kehrer | 3254741 | 2014-04-02 21:31:41 -0500 | [diff] [blame] | 75 | * Check for any outstanding code undergoing a deprecation cycle by looking in |
| 76 | ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open |
| 77 | a ticket to increment them for the next release. |
Alex Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 78 | * Send an email to the `mailing list`_ and `python-announce`_ announcing the |
| 79 | release. |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 80 | |
Alex Gaynor | 0830f92 | 2018-05-09 16:34:45 -0400 | [diff] [blame] | 81 | .. _`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] | 82 | .. _`milestone`: https://github.com/pyca/cryptography/milestones |
Ayrx | eced8b7 | 2014-05-04 16:07:39 +0800 | [diff] [blame] | 83 | .. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev |
Alex Gaynor | 72b596a | 2014-12-17 21:10:14 -0800 | [diff] [blame] | 84 | .. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list |