blob: 456179855bd06557f5b0db8aa3e5c2e51dc3fa01 [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
Alex Gaynor0830f922018-05-09 16:34:45 -04006Verifying OpenSSL version
7-------------------------
Paul Kehrer27bb5fe2014-07-04 11:28:08 -05008
Paul Kehrer1eeaabb2017-07-01 17:34:36 -05009The release process creates wheels bundling OpenSSL for Windows, macOS, and
10Linux. Check that the Windows and macOS Jenkins builders have the latest
11version of OpenSSL installed and verify that the latest version is present in
12the ``pyca/cryptography-manylinux1`` docker containers. If anything is out
Alex Gaynor0830f922018-05-09 16:34:45 -040013of date follow the instructions for upgrading OpenSSL.
Paul Kehrerb7af2f52015-09-22 14:50:26 -050014
Alex Gaynor0830f922018-05-09 16:34:45 -040015Upgrading OpenSSL
16-----------------
Paul Kehrerb7af2f52015-09-22 14:50:26 -050017
Alex Gaynor0830f922018-05-09 16:34:45 -040018Use the `upgrading OpenSSL issue template`_.
Paul Kehrer1eeaabb2017-07-01 17:34:36 -050019
Alex Gaynor89063f62014-01-06 15:52:38 -080020Bumping the version number
21--------------------------
22
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050023The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080024software.
25
Alex Gaynor0064bfa2015-03-09 07:10:40 -040026* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000027* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080028* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080029* Do a commit indicating this.
30* Send a pull request with this.
31* Wait for it to be merged.
32
33Performing the release
34----------------------
35
Alex Stapleton63b3de22014-02-08 09:43:16 +000036The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080037commit for this release. You will need to have ``gpg`` installed and a ``gpg``
38key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080039
Alex Gaynorc7dd9de2017-05-20 14:37:40 -070040* Run ``python release.py {version}``.
Alex Gaynor89063f62014-01-06 15:52:38 -080041
Alex Gaynorfea893c2014-01-07 11:06:51 -080042The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050043the repository.
44
45Verifying the release
46---------------------
47
48You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080049
50.. code-block:: pycon
51
52 >>> import cryptography
53 >>> cryptography.__version__
54 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000055 >>> import cryptography_vectors
56 >>> cryptography_vectors.__version__
57 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080058
59Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050060
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050061For the Windows wheels check the builds for the ``cryptography-wheel-builder``
62job and verify that the final output for each build shows it loaded and linked
63the expected OpenSSL version.
64
Paul Kehrerff26c742014-04-02 19:11:53 -050065Post-release tasks
66------------------
67
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050068* Update the version number to the next major (e.g. ``0.5.dev1``) in
Alex Gaynord7e73c22017-07-17 14:59:29 -040069 ``src/cryptography/__about__.py`` and
Paul Kehrerff26c742014-04-02 19:11:53 -050070 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070071* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050072* Add new :doc:`/changelog` entry with next version and note that it is under
73 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050074* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050075* 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 Gaynor72b596a2014-12-17 21:10:14 -080078* Send an email to the `mailing list`_ and `python-announce`_ announcing the
79 release.
Ayrxeced8b72014-05-04 16:07:39 +080080
Alex Gaynor0830f922018-05-09 16:34:45 -040081.. _`upgrading OpenSSL issue template`: https://github.com/pyca/cryptography/issues/new?template=openssl-release.md
Alex Gaynor5563ea02016-06-04 12:57:17 -070082.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080083.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -080084.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list