blob: f87a44995756d9040420aa4eb86dd8c652b0da3d [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 Gaynor00c0b232018-08-30 12:47:16 -04006Security Releases
7-----------------
8
9In addition to the other steps described below, for a release which fixes a
10security 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 Gaynor0830f922018-05-09 16:34:45 -040020Verifying OpenSSL version
21-------------------------
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050022
Paul Kehrer1eeaabb2017-07-01 17:34:36 -050023The release process creates wheels bundling OpenSSL for Windows, macOS, and
24Linux. Check that the Windows and macOS Jenkins builders have the latest
25version of OpenSSL installed and verify that the latest version is present in
26the ``pyca/cryptography-manylinux1`` docker containers. If anything is out
Alex Gaynor0830f922018-05-09 16:34:45 -040027of date follow the instructions for upgrading OpenSSL.
Paul Kehrerb7af2f52015-09-22 14:50:26 -050028
Alex Gaynor0830f922018-05-09 16:34:45 -040029Upgrading OpenSSL
30-----------------
Paul Kehrerb7af2f52015-09-22 14:50:26 -050031
Alex Gaynor0830f922018-05-09 16:34:45 -040032Use the `upgrading OpenSSL issue template`_.
Paul Kehrer1eeaabb2017-07-01 17:34:36 -050033
Alex Gaynor89063f62014-01-06 15:52:38 -080034Bumping the version number
35--------------------------
36
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050037The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080038software.
39
Alex Gaynor0064bfa2015-03-09 07:10:40 -040040* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000041* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080042* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080043* Do a commit indicating this.
44* Send a pull request with this.
45* Wait for it to be merged.
46
47Performing the release
48----------------------
49
Alex Stapleton63b3de22014-02-08 09:43:16 +000050The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080051commit for this release. You will need to have ``gpg`` installed and a ``gpg``
52key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080053
Alex Gaynorc7dd9de2017-05-20 14:37:40 -070054* Run ``python release.py {version}``.
Alex Gaynor89063f62014-01-06 15:52:38 -080055
Alex Gaynorfea893c2014-01-07 11:06:51 -080056The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050057the repository.
58
59Verifying the release
60---------------------
61
62You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080063
64.. code-block:: pycon
65
66 >>> import cryptography
67 >>> cryptography.__version__
68 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000069 >>> import cryptography_vectors
70 >>> cryptography_vectors.__version__
71 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080072
73Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050074
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050075For the Windows wheels check the builds for the ``cryptography-wheel-builder``
76job and verify that the final output for each build shows it loaded and linked
77the expected OpenSSL version.
78
Paul Kehrerff26c742014-04-02 19:11:53 -050079Post-release tasks
80------------------
81
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050082* Update the version number to the next major (e.g. ``0.5.dev1``) in
Alex Gaynord7e73c22017-07-17 14:59:29 -040083 ``src/cryptography/__about__.py`` and
Paul Kehrerff26c742014-04-02 19:11:53 -050084 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070085* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050086* Add new :doc:`/changelog` entry with next version and note that it is under
87 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050088* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050089* 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 Gaynor72b596a2014-12-17 21:10:14 -080092* Send an email to the `mailing list`_ and `python-announce`_ announcing the
93 release.
Ayrxeced8b72014-05-04 16:07:39 +080094
Alex Gaynor00c0b232018-08-30 12:47:16 -040095.. _`CVE from MITRE`: https://cveform.mitre.org/
96.. _`oss-security`: http://www.openwall.com/lists/oss-security/
Alex Gaynor0830f922018-05-09 16:34:45 -040097.. _`upgrading OpenSSL issue template`: https://github.com/pyca/cryptography/issues/new?template=openssl-release.md
Alex Gaynor5563ea02016-06-04 12:57:17 -070098.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080099.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -0800100.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list