Skip to content
Myr

contributing.rst

This file

Path

docs/dev/contributing.rst

144 lines · 5.3 KiB

Last changed by

improve contributions sectionKenneth Reitzbefore adoption688a00c

History of this file

Take it

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 1–25why, one step back
1.. _contributing:
23Contributor's Guide4===================56If you're reading this you're probably interested in contributing to7Requests. First, We'd like to say: thank you! Open source projects8live-and-die based on the support they receive from others, and the fact that9you're even considering supporting Requests is very generous of10you.1112This document lays out guidelines and advice for contributing to Requests.13If you're thinking of contributing, start by reading this thoroughly and14getting a feel for how contributing to the project works. If you have any15questions, feel free to reach out to either `Ian Cordasco`_ or `Cory Benfield`_,16the primary maintainers.1718The guide is split into sections based on the type of contribution you're19thinking of making, with a section that covers general guidelines for all20contributors.2122.. _Ian Cordasco: http://www.coglib.com/~icordasc/23.. _Cory Benfield: https://lukasa.co.uk/about2425Be Cordial

improve contributions sectionKenneth Reitzbefore adoption688a00c

line 26why, one step back
26----------

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 27–39why, one step back
27
28**Be cordial or be on your way.**2930Requests has one very important rule governing all forms of contribution,31including reporting bugs or requesting features. This golden rule is32`be cordial or be on your way`_. **All contributions are welcome**, as long as33everyone involved is treated with respect.3435.. _be cordial or be on your way: http://kennethreitz.org/be-cordial-or-be-on-your-way/3637.. _early-feedback:3839Get Early Feedback

improve contributions sectionKenneth Reitzbefore adoption688a00c

line 40why, one step back
40------------------

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 41–49why, one step back
41
42If you are contributing, do not feel the need to sit on your contribution until43it is perfectly polished and complete. It helps everyone involved for you to44seek feedback as early as you possibly can. Submitting an early, unfinished45version of your contribution for feedback in no way prejudices your chances of46getting that contribution accepted, and can save you from putting a lot of work47into a contribution that is not suitable for the project.4849Contribution Suitability

improve contributions sectionKenneth Reitzbefore adoption688a00c

line 50why, one step back
50------------------------

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 51–113why, one step back
51
52The project maintainer has the last word on whether or not a contribution is53suitable for Requests. All contributions will be considered, but from time54to time contributions will be rejected because they do not suit the project.5556If your contribution is rejected, don't despair! So long as you followed these57guidelines, you'll have a much better chance of getting your next contribution58accepted.596061Code Contributions62------------------6364Steps65~~~~~6667When contributing code, you'll want to follow this checklist:68691. Fork the repository on GitHub.702. Run the tests to confirm they all pass on your system. If they don't, you'll71 need to investigate why they fail. If you're unable to diagnose this72 yourself, raise it as a bug report by following the guidelines in this73 document: :ref:`bug-reports`.743. Write tests that demonstrate your bug or feature. Ensure that they fail.754. Make your change.765. Run the entire test suite again, confirming that all tests pass *including77 the ones you just added*.786. Send a GitHub Pull Request to the main repository's ``master`` branch.79 GitHub Pull Requests are the expected method of code collaboration on this80 project.8182The following sub-sections go into more detail on some of the points above.8384Code Review85~~~~~~~~~~~8687Contributions will not be merged until they've been code reviewed. You should88implement any code review feedback unless you strongly object to it. In the89event that you object to the code review feedback, you should make your case90clearly and calmly. If, after doing so, the feedback is judged to still apply,91you must either apply the feedback or withdraw your contribution.9293New Contributors94~~~~~~~~~~~~~~~~9596If you are new or relatively new to Open Source, welcome! Requests aims to97be a gentle introduction to the world of Open Source. If you're concerned about98how best to contribute, please consider mailing a maintainer (listed above) and99asking for help.100101Please also check the :ref:`early-feedback` section.102103Documentation Contributions104---------------------------105106Documentation improvements are always welcome! The documentation files live in107the ``docs/`` directory of the codebase. They're written in108`reStructuredText`_, and use `Sphinx`_ to generate the full suite of109documentation.110111When contributing documentation, please attempt to follow the style of the112documentation files. This means a soft-limit of 79 characters wide in your text113files and a semi-formal prose style.

improve contributions sectionKenneth Reitzbefore adoption688a00c

lines 114–116why, one step back
114
115When presenting Python code, use single-quoted strings (``'hello'`` instead of116``"hello"``).

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 117–137why, one step back
117
118.. _reStructuredText: http://docutils.sourceforge.net/rst.html119.. _Sphinx: http://sphinx-doc.org/index.html120121122.. _bug-reports:123124Bug Reports125-----------126127Bug reports are hugely important! Before you raise one, though, please check128through the `GitHub issues`_, **both open and closed**, to confirm that the bug129hasn't been reported before. Duplicate bug reports are a huge drain on the time130of other contributors, and should be avoided as much as possible.131132.. _GitHub issues: https://github.com/kennethreitz/requests/issues133134135Feature Requests136----------------137

Merge pull request #2608 from radarhere/patch-1Cory Benfieldbefore adoption3c850b3

line 138why, one step back
138Requests is in a perpetual feature freeze. The maintainers believe that

Merge remote-tracking branch 'origin/master'Kenneth Reitzbefore adoption8686255

lines 139–144why, one step back
139requests contains every major feature currently required by the vast majority
140of users.141142If you believe there is a feature missing, feel free to raise a feature143request, but please do be aware that the overwhelming likelihood is that your144feature request will not be accepted.