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