Merge branch 'master' into master
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Alessio Izzo · committed by GitHub · parents 27b24f9, 589a822 · Browse files · 6 files·+17 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+17 added−6 removed
- other:+17 added−6 removed
Provenance
- Commit
a0d5802- Tree
c358871- Author
Alessio Izzo <alessio.izzo86@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
27b24f9- Parent 2
589a822
6 files changed+17 added−6 removed
modified:docs/dev/contributing.rst+8 added-1 removed
128 unmodified lines129 # Aligned with opening delimiter.130 foo = long_function_name(var_one, var_two,131 var_three, var_four)132 133-No. Just don't. Please.133+No. Just don't. Please. This is much better::134 135+ foo = long_function_name(136+ var_one,137+ var_two,138+ var_three,139+ var_four,140+ )141+142 Docstrings are to follow the following syntaxes::143 144 def the_earth_is_flat():145 """NASA divided up the seas into thirty-three degrees."""71 unmodified linesmodified:docs/user/advanced.rst+1 added-1 removed
191 unmodified lines192 When you are using the prepared request flow, keep in mind that it does not take into account the environment.193 This can cause problems if you are using environment variables to change the behaviour of requests.194 For example: Self-signed SSL certificates specified in ``REQUESTS_CA_BUNDLE`` will not be taken into account.195 As a result an ``SSL: CERTIFICATE_VERIFY_FAILED`` is thrown.196-You can get around this behaviour by explicity merging the environment settings into your session::196+You can get around this behaviour by explicitly merging the environment settings into your session::197 198 from requests import Request, Session199 200 s = Session()832 unmodified linesmodified:requests/api.py+4 added-2 removed
14 unmodified lines15 16 def request(method, url, **kwargs):17 """Constructs and sends a :class:`Request <Request>`.18 19- :param method: method for the new :class:`Request` object.19+ :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS`, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.20 :param url: URL for the new :class:`Request` object.21 :param params: (optional) Dictionary, list of tuples or bytes to send22 in the query string for the :class:`Request`.23 :param data: (optional) Dictionary, list of tuples, bytes, or file-like68 unmodified lines92 def head(url, **kwargs):93 r"""Sends a HEAD request.94 95 :param url: URL for the new :class:`Request` object.96- :param \*\*kwargs: Optional arguments that ``request`` takes.96+ :param \*\*kwargs: Optional arguments that ``request`` takes. If97+ `allow_redirects` is not provided, it will be set to `False` (as98+ opposed to the default :meth:`request` behavior).99 :return: :class:`Response <Response>` object100 :rtype: requests.Response101 """102 59 unmodified linesmodified:.gitignore+1 added
12 unmodified lines13 *.pyc14 *.swp15 *.egg16 env/17+.eggs/18 19 .workon20 21 t.py5 unmodified linesmodified:AUTHORS.rst+2 added-1 removed
187 unmodified lines188 - Demetrios Bairaktaris (`@DemetriosBairaktaris <https://github.com/demetriosbairaktaris>`_)189 - Darren Dormer (`@ddormer <https://github.com/ddormer>`_)190 - Rajiv Mayani (`@mayani <https://github.com/mayani>`_)191 - Antti Kaihola (`@akaihola <https://github.com/akaihola>`_)192+- "Dull Bananas" <dull.bananas0@gmail.com> (`@dullbananas <https://github.com/dullbananas>`_)192-- Alessio Izzo (`@aless10 <https://github.com/aless10>`_)193+- Alessio Izzo (`@aless10 <https://github.com/aless10>`_)modified:HISTORY.md+1 added-1 removed
547 unmodified lines548 status code registry.549 550 **Bugfixes**551 552-- For file-like objects that are not seeked to the very beginning, we552+- For file-like objects that are not sought to the very beginning, we553 now send the content length for the number of bytes we will actually554 read, rather than the total size of the file, allowing partial file555 uploads.556 - When uploading file-like objects, if they are empty or have no1094 unmodified lines