blob: da25d45d4528c55f58299513ad8738376641d6e3 [file] [log] [blame]
Alex Stapletonc5fffd32014-03-18 15:29:00 +00001Doing a release
Alex Gaynor89063f62014-01-06 15:52:38 -08002===============
3
Paul Kehrer27bb5fe2014-07-04 11:28:08 -05004Doing a release of ``cryptography`` requires a few steps.
5
Paul Kehrerb7af2f52015-09-22 14:50:26 -05006Verifying and upgrading OpenSSL version
7---------------------------------------
Paul Kehrer27bb5fe2014-07-04 11:28:08 -05008
Alex Gaynor06049442017-03-15 12:21:45 -04009The release process uses a static build for Windows and macOS wheels. Check
10that the Windows and macOS Jenkins builders have the latest version of OpenSSL
Paul Kehrerb7af2f52015-09-22 14:50:26 -050011installed before performing the release. If they do not:
12
13Upgrading Windows
14~~~~~~~~~~~~~~~~~
15
Paul Kehrere9dbbd82017-03-09 18:43:40 -040016Run the ``openssl-release-1.1`` Jenkins job, then copy the resulting artifacts
17to the Windows builders and unzip them in the root of the file system.
Paul Kehrerb7af2f52015-09-22 14:50:26 -050018
Alex Gaynor06049442017-03-15 12:21:45 -040019Upgrading macOS
20~~~~~~~~~~~~~~~
Paul Kehrerb7af2f52015-09-22 14:50:26 -050021
Paul Kehrer5a284e62017-05-29 17:09:23 -050022Run the ``update-brew-openssl`` Jenkins job.
Alex Gaynor89063f62014-01-06 15:52:38 -080023
24Bumping the version number
25--------------------------
26
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050027The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080028software.
29
Alex Gaynor0064bfa2015-03-09 07:10:40 -040030* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000031* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080032* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080033* Do a commit indicating this.
34* Send a pull request with this.
35* Wait for it to be merged.
36
37Performing the release
38----------------------
39
Alex Stapleton63b3de22014-02-08 09:43:16 +000040The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080041commit for this release. You will need to have ``gpg`` installed and a ``gpg``
42key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080043
Alex Gaynorc7dd9de2017-05-20 14:37:40 -070044* Run ``python release.py {version}``.
Alex Gaynor89063f62014-01-06 15:52:38 -080045
Alex Gaynorfea893c2014-01-07 11:06:51 -080046The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050047the repository.
48
49Verifying the release
50---------------------
51
52You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080053
54.. code-block:: pycon
55
56 >>> import cryptography
57 >>> cryptography.__version__
58 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000059 >>> import cryptography_vectors
60 >>> cryptography_vectors.__version__
61 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080062
63Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050064
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050065For the Windows wheels check the builds for the ``cryptography-wheel-builder``
66job and verify that the final output for each build shows it loaded and linked
67the expected OpenSSL version.
68
Paul Kehrerff26c742014-04-02 19:11:53 -050069Post-release tasks
70------------------
71
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050072* Update the version number to the next major (e.g. ``0.5.dev1``) in
Paul Kehrerff26c742014-04-02 19:11:53 -050073 ``cryptography/__about__.py`` and
74 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070075* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050076* Add new :doc:`/changelog` entry with next version and note that it is under
77 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050078* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050079* Check for any outstanding code undergoing a deprecation cycle by looking in
80 ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
81 a ticket to increment them for the next release.
Alex Gaynor72b596a2014-12-17 21:10:14 -080082* Send an email to the `mailing list`_ and `python-announce`_ announcing the
83 release.
Ayrxeced8b72014-05-04 16:07:39 +080084
Alex Gaynor5563ea02016-06-04 12:57:17 -070085.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080086.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -080087.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list