PageRenderTime 21ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/RELEASE.rst

https://github.com/mongodb/mongo-python-driver
ReStructuredText | 102 lines | 72 code | 30 blank | 0 comment | 0 complexity | fad6410e072e5b7d1907fe293e7422ae MD5 | raw file
Possible License(s): Apache-2.0
  1. Some notes on PyMongo releases
  2. ==============================
  3. Versioning
  4. ----------
  5. We shoot for a release every few months - that will generally just
  6. increment the middle / minor version number (e.g. 3.5.0 -> 3.6.0).
  7. Patch releases are reserved for bug fixes (in general no new features
  8. or deprecations) - they only happen in cases where there is a critical
  9. bug in a recently released version, or when a release has no new
  10. features or API changes.
  11. In between releases we add .devN to the version number to denote the version
  12. under development. So if we just released 3.6.0, then the current dev
  13. version might be 3.6.1.dev0 or 3.7.0.dev0. When we make the next release we
  14. replace all instances of 3.x.x.devN in the docs with the new version number.
  15. https://semver.org/
  16. https://www.python.org/dev/peps/pep-0440/
  17. Deprecation
  18. -----------
  19. Changes should be backwards compatible unless absolutely necessary. When making
  20. API changes the approach is generally to add a deprecation warning but keeping
  21. the existing API functional. Deprecated features can be removed in a release
  22. that changes the major version number.
  23. Doing a Release
  24. ---------------
  25. 1. PyMongo is tested on Evergreen. Ensure the latest commit are passing CI
  26. as expected: https://evergreen.mongodb.com/waterfall/mongo-python-driver.
  27. To test locally, ``python3 setup.py test`` will build the C extensions and
  28. test. ``python3 tools/clean.py`` will remove the extensions,
  29. and then ``python3 setup.py --no_ext test`` will run the tests without
  30. them. You can also run the doctests: ``python3 setup.py doc -t``.
  31. 2. Check Jira to ensure all the tickets in this version have been completed.
  32. 3. Add release notes to doc/changelog.rst. Generally just summarize/clarify
  33. the git log, but you might add some more long form notes for big changes.
  34. 4. Search and replace the "devN" version number w/ the new version number (see
  35. note above in `Versioning`_).
  36. 5. Make sure version number is updated in setup.py and pymongo/__init__.py
  37. 6. Commit with a BUMP version_number message, eg ``git commit -m 'BUMP 3.11.0'``.
  38. 7. Tag w/ version_number, eg, ``git tag -a '3.11.0' -m '3.11.0' <COMMIT>``.
  39. 8. Push commit / tag, eg ``git push && git push --tags``.
  40. 9. Pushing a tag will trigger a release process in Evergreen which builds
  41. wheels and eggs for manylinux, macOS, and Windows. Wait for these jobs to
  42. complete and then download the "Release files" archive from each task. See:
  43. https://evergreen.mongodb.com/waterfall/mongo-python-driver?bv_filter=release
  44. Unpack each downloaded archive so that we can upload the included files. For
  45. the next steps let's assume we unpacked these files into the following paths::
  46. $ ls path/to/manylinux
  47. pymongo-<version>-cp38-cp38-manylinux2014_x86_64.whl
  48. ...
  49. $ ls path/to/windows/
  50. pymongo-<version>-cp38-cp38-win_amd64.whl
  51. ...
  52. 10. Build the source distribution::
  53. $ git clone git@github.com:mongodb/mongo-python-driver.git
  54. $ cd mongo-python-driver
  55. $ git checkout "<release version number>"
  56. $ python3 setup.py sdist
  57. This will create the following distribution::
  58. $ ls dist
  59. pymongo-<version>.tar.gz
  60. 11. Upload all the release packages to PyPI with twine::
  61. $ python3 -m twine upload dist/*.tar.gz path/to/manylinux/* path/to/mac/* path/to/windows/*
  62. 12. Make sure the new version appears on https://pymongo.readthedocs.io/. If the
  63. new version does not show up automatically, trigger a rebuild of "latest":
  64. https://readthedocs.org/projects/pymongo/builds/
  65. 13. Bump the version number to <next version>.dev0 in setup.py/__init__.py,
  66. commit, push.
  67. 14. Publish the release version in Jira.
  68. 15. Announce the release on:
  69. https://developer.mongodb.com/community/forums/c/community/release-notes/
  70. 16. File a ticket for DOCSP highlighting changes in server version and Python
  71. version compatibility or the lack thereof, for example:
  72. https://jira.mongodb.org/browse/DOCSP-13536