blob: 5d96a49e1624588fd951afe927ab751b1097cf7f [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
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
13of date:
Paul Kehrerb7af2f52015-09-22 14:50:26 -050014
15Upgrading Windows
16~~~~~~~~~~~~~~~~~
17
Paul Kehrere9dbbd82017-03-09 18:43:40 -040018Run the ``openssl-release-1.1`` Jenkins job, then copy the resulting artifacts
19to the Windows builders and unzip them in the root of the file system.
Paul Kehrerb7af2f52015-09-22 14:50:26 -050020
Alex Gaynor06049442017-03-15 12:21:45 -040021Upgrading macOS
22~~~~~~~~~~~~~~~
Paul Kehrerb7af2f52015-09-22 14:50:26 -050023
Paul Kehrer5a284e62017-05-29 17:09:23 -050024Run the ``update-brew-openssl`` Jenkins job.
Alex Gaynor89063f62014-01-06 15:52:38 -080025
Paul Kehrer1eeaabb2017-07-01 17:34:36 -050026Upgrading ``manylinux1`` docker containers
27~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28
29Send a pull request to the ``pyca/infra`` project updating the version and
30file hash in ``cryptography-manylinux1/install_openssl.sh``. Once this is
31merged the updated image will be available to the wheel builder.
32
Alex Gaynor89063f62014-01-06 15:52:38 -080033Bumping the version number
34--------------------------
35
Paul Kehrer27bb5fe2014-07-04 11:28:08 -050036The next step in doing a release is bumping the version number in the
Alex Gaynor89063f62014-01-06 15:52:38 -080037software.
38
Alex Gaynor0064bfa2015-03-09 07:10:40 -040039* Update the version number in ``src/cryptography/__about__.py``.
Alex Stapletona39a3192014-03-14 20:03:12 +000040* Update the version number in ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor3f230402014-01-08 09:21:57 -080041* Set the release date in the :doc:`/changelog`.
Alex Gaynor89063f62014-01-06 15:52:38 -080042* Do a commit indicating this.
43* Send a pull request with this.
44* Wait for it to be merged.
45
46Performing the release
47----------------------
48
Alex Stapleton63b3de22014-02-08 09:43:16 +000049The commit that merged the version number bump is now the official release
Alex Gaynorb3794db2014-01-07 09:25:54 -080050commit for this release. You will need to have ``gpg`` installed and a ``gpg``
51key in order to do a release. Once this has happened:
Alex Gaynor89063f62014-01-06 15:52:38 -080052
Alex Gaynorc7dd9de2017-05-20 14:37:40 -070053* Run ``python release.py {version}``.
Alex Gaynor89063f62014-01-06 15:52:38 -080054
Alex Gaynorfea893c2014-01-07 11:06:51 -080055The release should now be available on PyPI and a tag should be available in
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050056the repository.
57
58Verifying the release
59---------------------
60
61You should verify that ``pip install cryptography`` works correctly:
Alex Gaynor41c14d52014-01-07 11:19:08 -080062
63.. code-block:: pycon
64
65 >>> import cryptography
66 >>> cryptography.__version__
67 '...'
Alex Stapletona39a3192014-03-14 20:03:12 +000068 >>> import cryptography_vectors
69 >>> cryptography_vectors.__version__
70 '...'
Alex Gaynor41c14d52014-01-07 11:19:08 -080071
72Verify that this is the version you just released.
Paul Kehrerff26c742014-04-02 19:11:53 -050073
Paul Kehrer1f1e02f2014-07-06 08:52:17 -050074For the Windows wheels check the builds for the ``cryptography-wheel-builder``
75job and verify that the final output for each build shows it loaded and linked
76the expected OpenSSL version.
77
Paul Kehrerff26c742014-04-02 19:11:53 -050078Post-release tasks
79------------------
80
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050081* Update the version number to the next major (e.g. ``0.5.dev1``) in
Paul Kehrerff26c742014-04-02 19:11:53 -050082 ``cryptography/__about__.py`` and
83 ``vectors/cryptography_vectors/__about__.py``.
Alex Gaynor5563ea02016-06-04 12:57:17 -070084* Close the `milestone`_ for the previous release on GitHub.
Paul Kehrer3bcd3e02014-04-02 21:00:35 -050085* Add new :doc:`/changelog` entry with next version and note that it is under
86 active development
Paul Kehrerff26c742014-04-02 19:11:53 -050087* Send a pull request with these items
Paul Kehrer32547412014-04-02 21:31:41 -050088* Check for any outstanding code undergoing a deprecation cycle by looking in
89 ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
90 a ticket to increment them for the next release.
Alex Gaynor72b596a2014-12-17 21:10:14 -080091* Send an email to the `mailing list`_ and `python-announce`_ announcing the
92 release.
Ayrxeced8b72014-05-04 16:07:39 +080093
Alex Gaynor5563ea02016-06-04 12:57:17 -070094.. _`milestone`: https://github.com/pyca/cryptography/milestones
Ayrxeced8b72014-05-04 16:07:39 +080095.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
Alex Gaynor72b596a2014-12-17 21:10:14 -080096.. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list