contributing.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. Contributing
  2. ============
  3. urllib3 is a community-maintained project and we happily accept contributions.
  4. If you wish to add a new feature or fix a bug:
  5. #. `Check for open issues <https://github.com/urllib3/urllib3/issues>`_ or open
  6. a fresh issue to start a discussion around a feature idea or a bug. There is
  7. a *Contributor Friendly* tag for issues that should be ideal for people who
  8. are not very familiar with the codebase yet.
  9. #. Fork the `urllib3 repository on Github <https://github.com/urllib3/urllib3>`_
  10. to start making your changes.
  11. #. Write a test which shows that the bug was fixed or that the feature works
  12. as expected.
  13. #. Format your changes with black using command `$ nox -s blacken` and lint your
  14. changes using command `nox -s lint`.
  15. #. Send a pull request and bug the maintainer until it gets merged and published.
  16. :) Make sure to add yourself to ``CONTRIBUTORS.txt``.
  17. Setting up your development environment
  18. ---------------------------------------
  19. In order to setup the development environment all that you need is
  20. `nox <https://nox.thea.codes/en/stable/index.html>`_ installed in your machine::
  21. $ pip install --user --upgrade nox
  22. Running the tests
  23. -----------------
  24. We use some external dependencies, multiple interpreters and code coverage
  25. analysis while running test suite. Our ``noxfile.py`` handles much of this for
  26. you::
  27. $ nox --sessions test-2.7 test-3.7
  28. [ Nox will create virtualenv, install the specified dependencies, and run the commands in order.]
  29. nox > Running session test-2.7
  30. .......
  31. .......
  32. nox > Session test-2.7 was successful.
  33. .......
  34. .......
  35. nox > Running session test-3.7
  36. .......
  37. .......
  38. nox > Session test-3.7 was successful.
  39. There is also a nox command for running all of our tests and multiple python
  40. versions.
  41. $ nox --sessions test
  42. Note that code coverage less than 100% is regarded as a failing run. Some
  43. platform-specific tests are skipped unless run in that platform. To make sure
  44. the code works in all of urllib3's supported platforms, you can run our ``tox``
  45. suite::
  46. $ nox --sessions test
  47. [ Nox will create virtualenv, install the specified dependencies, and run the commands in order.]
  48. .......
  49. .......
  50. nox > Session test-2.7 was successful.
  51. nox > Session test-3.4 was successful.
  52. nox > Session test-3.5 was successful.
  53. nox > Session test-3.6 was successful.
  54. nox > Session test-3.7 was successful.
  55. nox > Session test-3.8 was successful.
  56. nox > Session test-pypy was successful.
  57. Our test suite `runs continuously on Travis CI
  58. <https://travis-ci.org/urllib3/urllib3>`_ with every pull request.
  59. Releases
  60. --------
  61. A release candidate can be created by any contributor by creating a branch
  62. named ``release-x.x`` where ``x.x`` is the version of the proposed release.
  63. - Update ``CHANGES.rst`` and ``urllib3/__init__.py`` with the proper version number
  64. and commit the changes to ``release-x.x``.
  65. - Open a pull request to merge the ``release-x.x`` branch into the ``master`` branch.
  66. - Integration tests are run against the release candidate on Travis. From here on all
  67. the steps below will be handled by a maintainer so unless you receive review comments
  68. you are done here.
  69. - Once the pull request is squash merged into master the merging maintainer
  70. will tag the merge commit with the version number:
  71. - ``git tag -a 1.24.1 [commit sha]``
  72. - ``git push origin master --tags``
  73. - After the commit is tagged Travis will build the tagged commit and upload the sdist and wheel
  74. to PyPI and create a draft release on GitHub for the tag. The merging maintainer will
  75. ensure that the PyPI sdist and wheel are properly uploaded.
  76. - The merging maintainer will mark the draft release on GitHub as an approved release.
  77. Sponsorship
  78. -----------
  79. .. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png
  80. :width: 75
  81. :alt: Tidelift
  82. .. list-table::
  83. :widths: 10 100
  84. * - |tideliftlogo|
  85. - Professional support for urllib3 is available as part of the `Tidelift
  86. Subscription`_. Tidelift gives software development teams a single source for
  87. purchasing and maintaining their software, with professional grade assurances
  88. from the experts who know it best, while seamlessly integrating with existing
  89. tools.
  90. .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=docs
  91. Please consider sponsoring urllib3 development, especially if your company
  92. benefits from this library.
  93. Your contribution will go towards adding new features to urllib3 and making
  94. sure all functionality continues to meet our high quality standards.
  95. We also welcome sponsorship in the form of time. We greatly appreciate companies
  96. who encourage employees to contribute on an ongoing basis during their work hours.
  97. Please let us know and we'll be glad to add you to our sponsors list!
  98. A grant for contiguous full-time development has the biggest impact for
  99. progress. Periods of 3 to 10 days allow a contributor to tackle substantial
  100. complex issues which are otherwise left to linger until somebody can't afford
  101. to not fix them.
  102. Contact `@theacodes <https://github.com/theacodes>`_ or `@shazow <https://github.com/shazow>`_
  103. to arrange a grant for a core contributor.
  104. Huge thanks to all the companies and individuals who financially contributed to
  105. the development of urllib3. Please send a PR if you've donated and would like
  106. to be listed.
  107. * `GOVCERT.LU <https://govcert.lu/>`_ (October 23, 2018)
  108. * `Stripe <https://stripe.com/>`_ (June 23, 2014)
  109. .. * [Company] ([date])