doing-a-release.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. Doing a release
  2. ===============
  3. Doing a release of ``cryptography`` requires a few steps.
  4. Verifying and upgrading OpenSSL version
  5. ---------------------------------------
  6. The release process creates wheels bundling OpenSSL for Windows, macOS, and
  7. Linux. Check that the Windows and macOS Jenkins builders have the latest
  8. version of OpenSSL installed and verify that the latest version is present in
  9. the ``pyca/cryptography-manylinux1`` docker containers. If anything is out
  10. of date:
  11. Upgrading Windows
  12. ~~~~~~~~~~~~~~~~~
  13. Run the ``openssl-release-1.1`` Jenkins job, then copy the resulting artifacts
  14. to the Windows builders and unzip them in the root of the file system.
  15. Upgrading macOS
  16. ~~~~~~~~~~~~~~~
  17. Run the ``update-brew-openssl`` Jenkins job.
  18. Upgrading ``manylinux1`` docker containers
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. Send a pull request to the ``pyca/infra`` project updating the version and
  21. file hash in ``cryptography-manylinux1/install_openssl.sh``. Once this is
  22. merged the updated image will be available to the wheel builder.
  23. Bumping the version number
  24. --------------------------
  25. The next step in doing a release is bumping the version number in the
  26. software.
  27. * Update the version number in ``src/cryptography/__about__.py``.
  28. * Update the version number in ``vectors/cryptography_vectors/__about__.py``.
  29. * Set the release date in the :doc:`/changelog`.
  30. * Do a commit indicating this.
  31. * Send a pull request with this.
  32. * Wait for it to be merged.
  33. Performing the release
  34. ----------------------
  35. The commit that merged the version number bump is now the official release
  36. commit for this release. You will need to have ``gpg`` installed and a ``gpg``
  37. key in order to do a release. Once this has happened:
  38. * Run ``python release.py {version}``.
  39. The release should now be available on PyPI and a tag should be available in
  40. the repository.
  41. Verifying the release
  42. ---------------------
  43. You should verify that ``pip install cryptography`` works correctly:
  44. .. code-block:: pycon
  45. >>> import cryptography
  46. >>> cryptography.__version__
  47. '...'
  48. >>> import cryptography_vectors
  49. >>> cryptography_vectors.__version__
  50. '...'
  51. Verify that this is the version you just released.
  52. For the Windows wheels check the builds for the ``cryptography-wheel-builder``
  53. job and verify that the final output for each build shows it loaded and linked
  54. the expected OpenSSL version.
  55. Post-release tasks
  56. ------------------
  57. * Update the version number to the next major (e.g. ``0.5.dev1``) in
  58. ``src/cryptography/__about__.py`` and
  59. ``vectors/cryptography_vectors/__about__.py``.
  60. * Close the `milestone`_ for the previous release on GitHub.
  61. * Add new :doc:`/changelog` entry with next version and note that it is under
  62. active development
  63. * Send a pull request with these items
  64. * Check for any outstanding code undergoing a deprecation cycle by looking in
  65. ``cryptography.utils`` for ``DeprecatedIn**`` definitions. If any exist open
  66. a ticket to increment them for the next release.
  67. * Send an email to the `mailing list`_ and `python-announce`_ announcing the
  68. release.
  69. .. _`milestone`: https://github.com/pyca/cryptography/milestones
  70. .. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
  71. .. _`python-announce`: https://mail.python.org/mailman/listinfo/python-announce-list